commit 796698a018ca68015ee69ce08026cf6e89c0eeca Author: quique Date: Thu Jun 7 13:33:34 2018 +0200 Sales app ios diff --git a/BaseLibrary/BaseLibrary.xcodeproj/project.pbxproj b/BaseLibrary/BaseLibrary.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ea5522a --- /dev/null +++ b/BaseLibrary/BaseLibrary.xcodeproj/project.pbxproj @@ -0,0 +1,621 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + A60259071C58FFE500A7695F /* UIImageViewAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = A60259061C58FFE500A7695F /* UIImageViewAsync.swift */; }; + A649BF311C96ED5F00024538 /* LocalizableBase.strings in Resources */ = {isa = PBXBuildFile; fileRef = A649BF261C96ED5F00024538 /* LocalizableBase.strings */; }; + A649BF321C96ED5F00024538 /* LocalizableBase.strings in Resources */ = {isa = PBXBuildFile; fileRef = A649BF291C96ED5F00024538 /* LocalizableBase.strings */; }; + A649BF331C96ED5F00024538 /* LocalizableBase.strings in Resources */ = {isa = PBXBuildFile; fileRef = A649BF2C1C96ED5F00024538 /* LocalizableBase.strings */; }; + A649BF341C96ED5F00024538 /* LocalizableBase.strings in Resources */ = {isa = PBXBuildFile; fileRef = A649BF2F1C96ED5F00024538 /* LocalizableBase.strings */; }; + A66EDF391C8985ED008EF663 /* CommandBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF2F1C8985ED008EF663 /* CommandBase.swift */; }; + A66EDF3C1C8985ED008EF663 /* FacadeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF331C8985ED008EF663 /* FacadeBase.swift */; }; + A66EDF3D1C8985ED008EF663 /* FacadeClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF341C8985ED008EF663 /* FacadeClient.swift */; }; + A66EDF3E1C8985ED008EF663 /* Parser.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF351C8985ED008EF663 /* Parser.swift */; }; + A66EDF3F1C8985ED008EF663 /* ParserBool.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF361C8985ED008EF663 /* ParserBool.swift */; }; + A66EDF401C8985ED008EF663 /* ParserVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF371C8985ED008EF663 /* ParserVoid.swift */; }; + A66EDF421C89861E008EF663 /* Ejecutador.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF411C89861E008EF663 /* Ejecutador.swift */; }; + A66EDF441C899CDB008EF663 /* CommandCallbacks.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF431C899CDB008EF663 /* CommandCallbacks.swift */; }; + A66EDF461C899F07008EF663 /* Reachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF451C899F07008EF663 /* Reachability.swift */; }; + A69B43061C6CA8E3009F69B4 /* UtilsNumbers.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69B43051C6CA8E3009F69B4 /* UtilsNumbers.swift */; }; + A69CEE5A1C3A9E4D00482F9B /* MyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69CEE591C3A9E4D00482F9B /* MyView.swift */; }; + A6B028581C574F2900D679EF /* UtilsIos.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B028571C574F2900D679EF /* UtilsIos.swift */; }; + A6BABF571C33F80B0082BADE /* BaseLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = A6BABF561C33F80B0082BADE /* BaseLibrary.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A6BABF5E1C33F80B0082BADE /* BaseLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6BABF531C33F80B0082BADE /* BaseLibrary.framework */; }; + A6BABF631C33F80B0082BADE /* BaseLibraryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BABF621C33F80B0082BADE /* BaseLibraryTests.swift */; }; + A6CC9CE01C633117009BD820 /* ModelBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6CC9CDF1C633117009BD820 /* ModelBase.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + A6BABF5F1C33F80B0082BADE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A6BABF4A1C33F80B0082BADE /* Project object */; + proxyType = 1; + remoteGlobalIDString = A6BABF521C33F80B0082BADE; + remoteInfo = BaseLibrary; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + A60259061C58FFE500A7695F /* UIImageViewAsync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UIImageViewAsync.swift; path = Core/UIImageViewAsync.swift; sourceTree = ""; }; + A649BF271C96ED5F00024538 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = LocalizableBase.strings; sourceTree = ""; }; + A649BF2A1C96ED5F00024538 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = LocalizableBase.strings; sourceTree = ""; }; + A649BF2D1C96ED5F00024538 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = LocalizableBase.strings; sourceTree = ""; }; + A649BF301C96ED5F00024538 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = LocalizableBase.strings; sourceTree = ""; }; + A66EDF2F1C8985ED008EF663 /* CommandBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommandBase.swift; sourceTree = ""; }; + A66EDF331C8985ED008EF663 /* FacadeBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FacadeBase.swift; sourceTree = ""; }; + A66EDF341C8985ED008EF663 /* FacadeClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FacadeClient.swift; sourceTree = ""; }; + A66EDF351C8985ED008EF663 /* Parser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Parser.swift; sourceTree = ""; }; + A66EDF361C8985ED008EF663 /* ParserBool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ParserBool.swift; sourceTree = ""; }; + A66EDF371C8985ED008EF663 /* ParserVoid.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ParserVoid.swift; sourceTree = ""; }; + A66EDF411C89861E008EF663 /* Ejecutador.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Ejecutador.swift; sourceTree = ""; }; + A66EDF431C899CDB008EF663 /* CommandCallbacks.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommandCallbacks.swift; sourceTree = ""; }; + A66EDF451C899F07008EF663 /* Reachability.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Reachability.swift; sourceTree = ""; }; + A69B43051C6CA8E3009F69B4 /* UtilsNumbers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UtilsNumbers.swift; path = Core/UtilsNumbers.swift; sourceTree = ""; }; + A69CEE591C3A9E4D00482F9B /* MyView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MyView.swift; path = Views/MyView.swift; sourceTree = ""; }; + A6B028571C574F2900D679EF /* UtilsIos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UtilsIos.swift; path = Core/UtilsIos.swift; sourceTree = ""; }; + A6BABF531C33F80B0082BADE /* BaseLibrary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BaseLibrary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A6BABF561C33F80B0082BADE /* BaseLibrary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseLibrary.h; sourceTree = ""; }; + A6BABF581C33F80B0082BADE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = BaseLibrary/Info.plist; sourceTree = ""; }; + A6BABF5D1C33F80B0082BADE /* BaseLibraryTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BaseLibraryTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + A6BABF621C33F80B0082BADE /* BaseLibraryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseLibraryTests.swift; sourceTree = ""; }; + A6BABF641C33F80B0082BADE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A6CC9CDF1C633117009BD820 /* ModelBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ModelBase.swift; path = Model/ModelBase.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A6BABF4F1C33F80B0082BADE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A6BABF5A1C33F80B0082BADE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A6BABF5E1C33F80B0082BADE /* BaseLibrary.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A649BF251C96ED5F00024538 /* ca.lproj */ = { + isa = PBXGroup; + children = ( + A649BF261C96ED5F00024538 /* LocalizableBase.strings */, + ); + name = ca.lproj; + path = Resources/Strings/ca.lproj; + sourceTree = ""; + }; + A649BF281C96ED5F00024538 /* en.lproj */ = { + isa = PBXGroup; + children = ( + A649BF291C96ED5F00024538 /* LocalizableBase.strings */, + ); + name = en.lproj; + path = Resources/Strings/en.lproj; + sourceTree = ""; + }; + A649BF2B1C96ED5F00024538 /* es.lproj */ = { + isa = PBXGroup; + children = ( + A649BF2C1C96ED5F00024538 /* LocalizableBase.strings */, + ); + name = es.lproj; + path = Resources/Strings/es.lproj; + sourceTree = ""; + }; + A649BF2E1C96ED5F00024538 /* pt.lproj */ = { + isa = PBXGroup; + children = ( + A649BF2F1C96ED5F00024538 /* LocalizableBase.strings */, + ); + name = pt.lproj; + path = Resources/Strings/pt.lproj; + sourceTree = ""; + }; + A65F5E7C1C47D107004FEAE1 /* Core */ = { + isa = PBXGroup; + children = ( + A60259061C58FFE500A7695F /* UIImageViewAsync.swift */, + A6B028571C574F2900D679EF /* UtilsIos.swift */, + A69B43051C6CA8E3009F69B4 /* UtilsNumbers.swift */, + ); + name = Core; + sourceTree = ""; + }; + A66EDF2C1C8985ED008EF663 /* Communicacion */ = { + isa = PBXGroup; + children = ( + A66EDF2D1C8985ED008EF663 /* Command */, + A66EDF321C8985ED008EF663 /* Facade */, + A66EDF411C89861E008EF663 /* Ejecutador.swift */, + ); + path = Communicacion; + sourceTree = ""; + }; + A66EDF2D1C8985ED008EF663 /* Command */ = { + isa = PBXGroup; + children = ( + A66EDF2F1C8985ED008EF663 /* CommandBase.swift */, + A66EDF431C899CDB008EF663 /* CommandCallbacks.swift */, + A66EDF451C899F07008EF663 /* Reachability.swift */, + ); + path = Command; + sourceTree = ""; + }; + A66EDF321C8985ED008EF663 /* Facade */ = { + isa = PBXGroup; + children = ( + A66EDF331C8985ED008EF663 /* FacadeBase.swift */, + A66EDF341C8985ED008EF663 /* FacadeClient.swift */, + A66EDF351C8985ED008EF663 /* Parser.swift */, + A66EDF361C8985ED008EF663 /* ParserBool.swift */, + A66EDF371C8985ED008EF663 /* ParserVoid.swift */, + ); + path = Facade; + sourceTree = ""; + }; + A66EDF471C89A443008EF663 /* Resources */ = { + isa = PBXGroup; + children = ( + A66EDF481C89A44B008EF663 /* Strings.bundle */, + ); + name = Resources; + sourceTree = ""; + }; + A66EDF481C89A44B008EF663 /* Strings.bundle */ = { + isa = PBXGroup; + children = ( + A649BF251C96ED5F00024538 /* ca.lproj */, + A649BF281C96ED5F00024538 /* en.lproj */, + A649BF2B1C96ED5F00024538 /* es.lproj */, + A649BF2E1C96ED5F00024538 /* pt.lproj */, + ); + name = Strings.bundle; + sourceTree = ""; + }; + A69CEE581C3A9E3700482F9B /* Views */ = { + isa = PBXGroup; + children = ( + A69CEE591C3A9E4D00482F9B /* MyView.swift */, + ); + name = Views; + sourceTree = ""; + }; + A6B1E91D1C60BA6B00D3A0A5 /* Model */ = { + isa = PBXGroup; + children = ( + A6CC9CDF1C633117009BD820 /* ModelBase.swift */, + ); + name = Model; + sourceTree = ""; + }; + A6BABF491C33F80B0082BADE = { + isa = PBXGroup; + children = ( + A6BABF551C33F80B0082BADE /* BaseLibrary */, + A6BABF581C33F80B0082BADE /* Info.plist */, + A6BABF611C33F80B0082BADE /* BaseLibraryTests */, + A6BABF541C33F80B0082BADE /* Products */, + ); + sourceTree = ""; + }; + A6BABF541C33F80B0082BADE /* Products */ = { + isa = PBXGroup; + children = ( + A6BABF531C33F80B0082BADE /* BaseLibrary.framework */, + A6BABF5D1C33F80B0082BADE /* BaseLibraryTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + A6BABF551C33F80B0082BADE /* BaseLibrary */ = { + isa = PBXGroup; + children = ( + A66EDF471C89A443008EF663 /* Resources */, + A66EDF2C1C8985ED008EF663 /* Communicacion */, + A6BABF561C33F80B0082BADE /* BaseLibrary.h */, + A65F5E7C1C47D107004FEAE1 /* Core */, + A6B1E91D1C60BA6B00D3A0A5 /* Model */, + A69CEE581C3A9E3700482F9B /* Views */, + ); + path = BaseLibrary; + sourceTree = ""; + }; + A6BABF611C33F80B0082BADE /* BaseLibraryTests */ = { + isa = PBXGroup; + children = ( + A6BABF621C33F80B0082BADE /* BaseLibraryTests.swift */, + A6BABF641C33F80B0082BADE /* Info.plist */, + ); + path = BaseLibraryTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + A6BABF501C33F80B0082BADE /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A6BABF571C33F80B0082BADE /* BaseLibrary.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + A6BABF521C33F80B0082BADE /* BaseLibrary */ = { + isa = PBXNativeTarget; + buildConfigurationList = A6BABF671C33F80B0082BADE /* Build configuration list for PBXNativeTarget "BaseLibrary" */; + buildPhases = ( + A6BABF4E1C33F80B0082BADE /* Sources */, + A6BABF4F1C33F80B0082BADE /* Frameworks */, + A6BABF501C33F80B0082BADE /* Headers */, + A6BABF511C33F80B0082BADE /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = BaseLibrary; + productName = BaseLibrary; + productReference = A6BABF531C33F80B0082BADE /* BaseLibrary.framework */; + productType = "com.apple.product-type.framework"; + }; + A6BABF5C1C33F80B0082BADE /* BaseLibraryTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = A6BABF6A1C33F80B0082BADE /* Build configuration list for PBXNativeTarget "BaseLibraryTests" */; + buildPhases = ( + A6BABF591C33F80B0082BADE /* Sources */, + A6BABF5A1C33F80B0082BADE /* Frameworks */, + A6BABF5B1C33F80B0082BADE /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + A6BABF601C33F80B0082BADE /* PBXTargetDependency */, + ); + name = BaseLibraryTests; + productName = BaseLibraryTests; + productReference = A6BABF5D1C33F80B0082BADE /* BaseLibraryTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A6BABF4A1C33F80B0082BADE /* Project object */ = { + isa = PBXProject; + attributes = { + KnownAssetTags = ( + New, + ); + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0820; + ORGANIZATIONNAME = "Nelo Sanchez Gomiz"; + TargetAttributes = { + A6BABF521C33F80B0082BADE = { + CreatedOnToolsVersion = 7.2; + LastSwiftMigration = 0820; + }; + A6BABF5C1C33F80B0082BADE = { + CreatedOnToolsVersion = 7.2; + }; + }; + }; + buildConfigurationList = A6BABF4D1C33F80B0082BADE /* Build configuration list for PBXProject "BaseLibrary" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + es, + Base, + ca, + pt, + ); + mainGroup = A6BABF491C33F80B0082BADE; + productRefGroup = A6BABF541C33F80B0082BADE /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A6BABF521C33F80B0082BADE /* BaseLibrary */, + A6BABF5C1C33F80B0082BADE /* BaseLibraryTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A6BABF511C33F80B0082BADE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A649BF311C96ED5F00024538 /* LocalizableBase.strings in Resources */, + A649BF341C96ED5F00024538 /* LocalizableBase.strings in Resources */, + A649BF331C96ED5F00024538 /* LocalizableBase.strings in Resources */, + A649BF321C96ED5F00024538 /* LocalizableBase.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A6BABF5B1C33F80B0082BADE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A6BABF4E1C33F80B0082BADE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A66EDF461C899F07008EF663 /* Reachability.swift in Sources */, + A69CEE5A1C3A9E4D00482F9B /* MyView.swift in Sources */, + A66EDF421C89861E008EF663 /* Ejecutador.swift in Sources */, + A66EDF3D1C8985ED008EF663 /* FacadeClient.swift in Sources */, + A66EDF3C1C8985ED008EF663 /* FacadeBase.swift in Sources */, + A66EDF401C8985ED008EF663 /* ParserVoid.swift in Sources */, + A66EDF391C8985ED008EF663 /* CommandBase.swift in Sources */, + A60259071C58FFE500A7695F /* UIImageViewAsync.swift in Sources */, + A66EDF3F1C8985ED008EF663 /* ParserBool.swift in Sources */, + A66EDF441C899CDB008EF663 /* CommandCallbacks.swift in Sources */, + A6B028581C574F2900D679EF /* UtilsIos.swift in Sources */, + A66EDF3E1C8985ED008EF663 /* Parser.swift in Sources */, + A69B43061C6CA8E3009F69B4 /* UtilsNumbers.swift in Sources */, + A6CC9CE01C633117009BD820 /* ModelBase.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A6BABF591C33F80B0082BADE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A6BABF631C33F80B0082BADE /* BaseLibraryTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + A6BABF601C33F80B0082BADE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A6BABF521C33F80B0082BADE /* BaseLibrary */; + targetProxy = A6BABF5F1C33F80B0082BADE /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + A649BF261C96ED5F00024538 /* LocalizableBase.strings */ = { + isa = PBXVariantGroup; + children = ( + A649BF271C96ED5F00024538 /* ca */, + ); + name = LocalizableBase.strings; + sourceTree = ""; + }; + A649BF291C96ED5F00024538 /* LocalizableBase.strings */ = { + isa = PBXVariantGroup; + children = ( + A649BF2A1C96ED5F00024538 /* en */, + ); + name = LocalizableBase.strings; + sourceTree = ""; + }; + A649BF2C1C96ED5F00024538 /* LocalizableBase.strings */ = { + isa = PBXVariantGroup; + children = ( + A649BF2D1C96ED5F00024538 /* es */, + ); + name = LocalizableBase.strings; + sourceTree = ""; + }; + A649BF2F1C96ED5F00024538 /* LocalizableBase.strings */ = { + isa = PBXVariantGroup; + children = ( + A649BF301C96ED5F00024538 /* pt */, + ); + name = LocalizableBase.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + A6BABF651C33F80B0082BADE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + A6BABF661C33F80B0082BADE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + A6BABF681C33F80B0082BADE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = BaseLibrary/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = nelosan.BaseLibrary; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + A6BABF691C33F80B0082BADE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = BaseLibrary/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = nelosan.BaseLibrary; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; + A6BABF6B1C33F80B0082BADE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = BaseLibraryTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = nelosan.BaseLibraryTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A6BABF6C1C33F80B0082BADE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = BaseLibraryTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = nelosan.BaseLibraryTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A6BABF4D1C33F80B0082BADE /* Build configuration list for PBXProject "BaseLibrary" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A6BABF651C33F80B0082BADE /* Debug */, + A6BABF661C33F80B0082BADE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A6BABF671C33F80B0082BADE /* Build configuration list for PBXNativeTarget "BaseLibrary" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A6BABF681C33F80B0082BADE /* Debug */, + A6BABF691C33F80B0082BADE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A6BABF6A1C33F80B0082BADE /* Build configuration list for PBXNativeTarget "BaseLibraryTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A6BABF6B1C33F80B0082BADE /* Debug */, + A6BABF6C1C33F80B0082BADE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A6BABF4A1C33F80B0082BADE /* Project object */; +} diff --git a/BaseLibrary/BaseLibrary.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/BaseLibrary/BaseLibrary.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..138c00b --- /dev/null +++ b/BaseLibrary/BaseLibrary.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/BaseLibrary/BaseLibrary.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/BaseLibrary/BaseLibrary.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/BaseLibrary/BaseLibrary.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/BaseLibrary/BaseLibrary.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/UserInterfaceState.xcuserstate b/BaseLibrary/BaseLibrary.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..2f725ee Binary files /dev/null and b/BaseLibrary/BaseLibrary.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/BaseLibrary/BaseLibrary.xcodeproj/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcschemes/xcschememanagement.plist b/BaseLibrary/BaseLibrary.xcodeproj/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..0efb056 --- /dev/null +++ b/BaseLibrary/BaseLibrary.xcodeproj/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + BaseLibrary.xcscheme + + orderHint + 1 + + + + diff --git a/BaseLibrary/BaseLibrary.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/BaseLibrary.xcscheme b/BaseLibrary/BaseLibrary.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/BaseLibrary.xcscheme new file mode 100644 index 0000000..65df449 --- /dev/null +++ b/BaseLibrary/BaseLibrary.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/BaseLibrary.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BaseLibrary/BaseLibrary.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/xcschememanagement.plist b/BaseLibrary/BaseLibrary.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ad3ddf5 --- /dev/null +++ b/BaseLibrary/BaseLibrary.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,27 @@ + + + + + SchemeUserState + + BaseLibrary.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + A6BABF521C33F80B0082BADE + + primary + + + A6BABF5C1C33F80B0082BADE + + primary + + + + + diff --git a/BaseLibrary/BaseLibrary/BaseLibrary.h b/BaseLibrary/BaseLibrary/BaseLibrary.h new file mode 100644 index 0000000..f8503c9 --- /dev/null +++ b/BaseLibrary/BaseLibrary/BaseLibrary.h @@ -0,0 +1,19 @@ +// +// BaseLibrary.h +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +#import + +//! Project version number for BaseLibrary. +FOUNDATION_EXPORT double BaseLibraryVersionNumber; + +//! Project version string for BaseLibrary. +FOUNDATION_EXPORT const unsigned char BaseLibraryVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/BaseLibrary/BaseLibrary/Communicacion/Command/CommandBase.swift b/BaseLibrary/BaseLibrary/Communicacion/Command/CommandBase.swift new file mode 100644 index 0000000..18f93a8 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Communicacion/Command/CommandBase.swift @@ -0,0 +1,135 @@ +// +// CommandBase.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 29/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// +// +// FacadeClient.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 29/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import CoreLocation + +open class CommandBase: NSObject { + + open var succesMessage: String = "" + open var needInternet: Bool = true + open var cancel = false + open var cancelable = true + open var error: String = "" + open var errorMessage: String = "" + open var view: UIViewController? + open var callbacks: CommandCallbacks? + var ejecutador = Ejecutador.getInstance() + + open func executeTask(_ view: UIViewController) + { + self.view = view + //LANZA UNA TAREA EN SEGUNDO PLANO + DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.default).async(execute: { + + do{ + try self.execute() + } + catch let error as NSError { + self.error = error.description + } + self.onPostExecute() + + }); + } + + open func execute() throws {} + + + open func onPostExecute() + { + //EJECUTA LA FUNCIONALIDAD EN EL HILO PRINCIPAL + DispatchQueue.main.async(execute: { + if(!self.cancel) + { + if(self.error != "" && self.errorMessage != "") + { + self.mostrarAviso(self.errorMessage, showRetry: true) + } + else + { + self.Finished() + } + } + }); + + } + + open func isNeedInternet() -> Bool { + return needInternet + } + + + func mostrarAviso(_ msg: String, showRetry: Bool) + { + let alert = UIAlertController(title: NSLocalizedString("error", comment: ""), message: msg, preferredStyle: UIAlertControllerStyle.alert) + + let retry: UIAlertAction = UIAlertAction(title: NSLocalizedString("retry", comment: ""), style: .default) { action -> Void in + self.retry() + } + let accept: UIAlertAction = UIAlertAction(title: NSLocalizedString("accept", comment: ""), style: .default) { action -> Void in + self.accept() + } + alert.addAction(retry) + alert.addAction(accept) + view!.present(alert, animated: true, completion: nil) + } + + open func onCancelled() { + if(cancelable) + { + cancel = true + } + } + + open func Finished(){ + if(callbacks != nil) + { + callbacks!.onFinish() + } + + } + + open func Start(){ + if(callbacks != nil) + { + callbacks!.onStart() + } + } + + open func retry() + { + if(callbacks != nil) + { + callbacks!.onRetry() + } + + } + + open func accept() + { + if(callbacks != nil) + { + callbacks!.onAccept() + } + + } + + +} + + + + diff --git a/BaseLibrary/BaseLibrary/Communicacion/Command/CommandCallbacks.swift b/BaseLibrary/BaseLibrary/Communicacion/Command/CommandCallbacks.swift new file mode 100644 index 0000000..3ed74f9 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Communicacion/Command/CommandCallbacks.swift @@ -0,0 +1,50 @@ +// +// CommandCallbacks.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 4/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class CommandCallbacks { + + var retry: (() -> Void)? + var accept: (() -> Void)? + var start: (() -> Void)? + var finish: (() -> Void)? + + open func onRetry(){ + if let _ = self.retry { + retry!() + } + } + + open func onAccept(){ + if let _ = self.accept { + accept!() + } + } + + open func onFinish(){ + if let _ = self.finish { + finish!() + } + } + + open func onStart(){ + if let _ = self.start { + start!() + } + } + + public init(handlerStart: @escaping (() -> Void), handlerFinish: @escaping (() -> Void), handlerRetry: @escaping (() -> Void), handlerAccept: @escaping (() -> Void)) + { + self.retry = handlerRetry + self.accept = handlerAccept + self.start = handlerStart + self.finish = handlerFinish + } + +} diff --git a/BaseLibrary/BaseLibrary/Communicacion/Command/Reachability.swift b/BaseLibrary/BaseLibrary/Communicacion/Command/Reachability.swift new file mode 100644 index 0000000..1f184d6 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Communicacion/Command/Reachability.swift @@ -0,0 +1,40 @@ +// +// Reachability.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 4/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import Foundation +import SystemConfiguration + +open class Reachability { + + class func isConnectedToNetwork() -> Bool { + + var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0, 0, 0, 0, 0, 0, 0)) + zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress)) + zeroAddress.sin_family = sa_family_t(AF_INET) + + guard let defaultRouteReachability = withUnsafePointer(to: &zeroAddress, { + $0.withMemoryRebound(to: sockaddr.self, capacity: 1) { + SCNetworkReachabilityCreateWithAddress(nil, $0) + } + + }) else { + return false + } + + var flags: SCNetworkReachabilityFlags = SCNetworkReachabilityFlags(rawValue: 0) + if SCNetworkReachabilityGetFlags(defaultRouteReachability, &flags) == false { + return false + } + + let isReachable = flags == .reachable + let needsConnection = flags == .connectionRequired + + return isReachable && !needsConnection + + } +} diff --git a/BaseLibrary/BaseLibrary/Communicacion/Ejecutador.swift b/BaseLibrary/BaseLibrary/Communicacion/Ejecutador.swift new file mode 100644 index 0000000..a6e067b --- /dev/null +++ b/BaseLibrary/BaseLibrary/Communicacion/Ejecutador.swift @@ -0,0 +1,73 @@ +// +// Ejecutador.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 4/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class Ejecutador: NSObject { + + var commands = Array() + + static var INSTANCE: Ejecutador? = nil + + override init (){} + + static func createInstance() { + if (INSTANCE == nil) { + INSTANCE = Ejecutador() + } + } + + open static func getInstance() -> Ejecutador { + if (INSTANCE == nil) + { + createInstance() + } + return INSTANCE! + } + + open func exeute(_ cmd: CommandBase, view: UIViewController) + { + var existe = false + for c in commands + { + if(c == cmd) + { + existe = true + break + } + } + + if(!existe) + { + commands.append(cmd) + } + cmd.executeTask(view) + } + + func cancelCommad(_ cmd: CommandBase) + { + cmd.cancel = true + removeCommand(cmd) + } + + open func removeCommand(_ cmd: CommandBase) + { + let index = commands.index(of: cmd) + commands.remove(at: index!) + } + + open func removeCommands() + { + for cmd in commands{ + cancelCommad(cmd) + } + + } + + +} diff --git a/BaseLibrary/BaseLibrary/Communicacion/Facade/FacadeBase.swift b/BaseLibrary/BaseLibrary/Communicacion/Facade/FacadeBase.swift new file mode 100644 index 0000000..1d43474 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Communicacion/Facade/FacadeBase.swift @@ -0,0 +1,21 @@ +// +// FacadeBase.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class FacadeBase: NSObject { + + open var facadeName = "" + open var facade: FacadeClient? + + open func Execute(_ parser: T?, command: String, args: AnyObject...) throws -> AnyObject? + { + return try facade!.Execute(parser, facade: facadeName, command: command, args: args as AnyObject) + } + +} diff --git a/BaseLibrary/BaseLibrary/Communicacion/Facade/FacadeClient.swift b/BaseLibrary/BaseLibrary/Communicacion/Facade/FacadeClient.swift new file mode 100644 index 0000000..ff8952c --- /dev/null +++ b/BaseLibrary/BaseLibrary/Communicacion/Facade/FacadeClient.swift @@ -0,0 +1,79 @@ +// +// FacadeClient.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 29/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class FacadeClient: NSObject +{ + open let POST = "POST" + open let GET = "GET" + + public enum ErrorFacade: Error { + case errorServidor(String) + } + + func Execute(_ parser: T?, facade: String, command: String, args: AnyObject...) throws -> AnyObject? + { + let jsonObject = try InnerExecute(facade, command: command, args: (args as AnyObject) as! Array, file: nil) + var data: AnyObject? = nil + if(parser != nil && jsonObject != nil) + { + data = parser!.parse(jsonObject!) as? AnyObject + } + else{ + data = jsonObject + } + + return data + } + + fileprivate func InnerExecute(_ facade: String, command: String , args: Array, file: String?) throws -> AnyObject? + { + //FALTA CODIGO FICHEROS + var argsMessage: String? = "" + var datos: AnyObject? = nil + do { + let data = try JSONSerialization.data(withJSONObject: args[0], options: JSONSerialization.WritingOptions(rawValue: 0)) + argsMessage = String(data: data, encoding: String.Encoding.utf8) + }catch let error as NSError{ + print(error.description) + throw ErrorFacade.errorServidor(error.description) + } + + do{ + try WriteResponseToStream(facade, command: command, argsMessage: argsMessage, datos: &datos) + } + catch let error as NSError + { + throw ErrorFacade.errorServidor(error.description) + } + + return datos + + } + + open func tratarJson(_ datos: Data) -> AnyObject? + { + do{ + if let json = try JSONSerialization.jsonObject(with: datos, options: JSONSerialization.ReadingOptions.allowFragments) as AnyObject? + { + return json + } + }catch + { + return nil + } + + return nil + } + + + open func WriteResponseToStream(_ facade: String, command: String, argsMessage: String!, datos: inout AnyObject?) throws {} + + +} diff --git a/BaseLibrary/BaseLibrary/Communicacion/Facade/Parser.swift b/BaseLibrary/BaseLibrary/Communicacion/Facade/Parser.swift new file mode 100644 index 0000000..d977028 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Communicacion/Facade/Parser.swift @@ -0,0 +1,18 @@ +// +// Parser.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 4/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +public protocol Parser +{ + associatedtype T + + func parse(_: AnyObject) -> T + + +} diff --git a/BaseLibrary/BaseLibrary/Communicacion/Facade/ParserBool.swift b/BaseLibrary/BaseLibrary/Communicacion/Facade/ParserBool.swift new file mode 100644 index 0000000..5264afa --- /dev/null +++ b/BaseLibrary/BaseLibrary/Communicacion/Facade/ParserBool.swift @@ -0,0 +1,24 @@ +// +// ParserDictionary.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 17/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class ParserBool: Parser { + + public typealias T = Bool + + public init(){} + + open func parse(_ jsonObject: AnyObject) -> Bool + { + + return jsonObject as! Bool + + } + +} diff --git a/BaseLibrary/BaseLibrary/Communicacion/Facade/ParserVoid.swift b/BaseLibrary/BaseLibrary/Communicacion/Facade/ParserVoid.swift new file mode 100644 index 0000000..08b4548 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Communicacion/Facade/ParserVoid.swift @@ -0,0 +1,20 @@ +// +// ParserDefault.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 11/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class ParserVoid: Parser { + + public typealias T = Void + + public init(){} + + open func parse(_ jsonObject: AnyObject) -> Void + { + } +} diff --git a/BaseLibrary/BaseLibrary/Core/UIImageViewAsync.swift b/BaseLibrary/BaseLibrary/Core/UIImageViewAsync.swift new file mode 100644 index 0000000..308f6eb --- /dev/null +++ b/BaseLibrary/BaseLibrary/Core/UIImageViewAsync.swift @@ -0,0 +1,60 @@ +// +// UIImageViewAsync.swift +// ElTiempo +// +// Created by Jordi on 10/7/15. +// Copyright (c) 2015 EPSA UPV. All rights reserved. +// + +import Foundation +import UIKit + +open class UIImageViewAsync :UIImageView +{ + + override init(frame:CGRect) + { + super.init(frame:frame) + } + + required public init(coder aDecoder: NSCoder) { + super.init(coder: aDecoder)! + } + + open func getDataFromUrl(_ url:String, completion: @escaping ((_ data: Data?) -> Void)) { + if(verifyUrl(url)){ + URLSession.shared.dataTask(with: URL(string: url)!, completionHandler: { (data, response, error) in + if(data != nil) + { + completion(NSData(data: data!) as Data) + } + }) .resume() + } + } + + open func downloadImage(_ url:String){ + getDataFromUrl(url) { data in + self.completion(data) + } + } + + open func completion(_ data: Data?) + { + DispatchQueue.main.async { + self.contentMode = self.contentMode + self.image = UIImage(data: data!) + } + } + + open func verifyUrl (_ urlString: String?) -> Bool { + //Check for nil + if let urlString = urlString { + // create NSURL instance + if let url = URL(string: urlString) { + // check if your application can open the NSURL instance + return UIApplication.shared.canOpenURL(url) + } + } + return false + } +} diff --git a/BaseLibrary/BaseLibrary/Core/UtilsIos.swift b/BaseLibrary/BaseLibrary/Core/UtilsIos.swift new file mode 100644 index 0000000..262eb38 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Core/UtilsIos.swift @@ -0,0 +1,69 @@ +// +// UtilsIos.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 26/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class UtilsIos: NSObject { + + open static func registerNib(_ table: UITableView, cell: String) + { + let nib = UINib(nibName: cell, bundle: nil) + table.register(nib, forCellReuseIdentifier: cell) + } + + open static func registerNibCollection(_ collection: UICollectionView, cell: String) + { + let nib = UINib(nibName: cell, bundle: nil) + collection.register(nib, forCellWithReuseIdentifier: cell) + } + + open static func getColor(_ rgbValue: UInt) -> UIColor { + return UIColor( + red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0, + green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0, + blue: CGFloat(rgbValue & 0x0000FF) / 255.0, + alpha: CGFloat(1.0) + ) + } + + open static func getColor(_ rgbValue: UInt, alpha: CGFloat) -> UIColor { + return UIColor( + red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0, + green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0, + blue: CGFloat(rgbValue & 0x0000FF) / 255.0, + alpha: CGFloat(alpha) + ) + } + + open static func nullToNil(_ value : AnyObject?) -> AnyObject? { + if value is NSNull { + return nil + } else { + return value + } + } + + open static func toString(_ value: AnyObject) -> String{ + return "\(value)" + } + + open static func toBool(_ value: String) -> Bool? { + switch (value){ + case "True", "true", "yes", "1": + return true + case "False", "false", "no", "0": + return false + default: + return nil + } + } + + + + +} diff --git a/BaseLibrary/BaseLibrary/Core/UtilsNumbers.swift b/BaseLibrary/BaseLibrary/Core/UtilsNumbers.swift new file mode 100644 index 0000000..c1fa3e5 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Core/UtilsNumbers.swift @@ -0,0 +1,19 @@ +// +// UtilsNumbers.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 11/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class UtilsNumbers: NSObject { + + open static func roundDouble(_ number: NSNumber, decimals: Int) -> Double + { + let dec = "%.\(decimals)f" + return Double(String(format: dec, number.doubleValue))! + } + +} diff --git a/BaseLibrary/BaseLibrary/Info.plist b/BaseLibrary/BaseLibrary/Info.plist new file mode 100644 index 0000000..d29e136 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Info.plist @@ -0,0 +1,33 @@ + + + + + CFBundleLocalizations + + Portugues + Catalan + en + Spanish + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/BaseLibrary/BaseLibrary/Model/ModelBase.swift b/BaseLibrary/BaseLibrary/Model/ModelBase.swift new file mode 100644 index 0000000..5cc6cf7 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Model/ModelBase.swift @@ -0,0 +1,112 @@ +// +// ModelBase.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 4/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class ModelBase: NSObject { + + open func parseJson(_ json: NSDictionary) + { + let dictionary = generateDictionary() + for (key, value) in dictionary{ + if let val = json[key] + { + castType(value, value: val as AnyObject?, property: key) + } + } + + } + + + + func generateDictionary() -> Dictionary{ + + var dictionary = Dictionary() + + let mirror = Mirror(reflecting: self) + for child in mirror.children { + dictionary[child.label!] = String(describing: type(of: (child.value))) + if((dictionary[child.label!]?.lowercased().contains("optional")) != nil){ + let typeArr = dictionary[child.label!]!.characters.split{$0 == "<"}.map(String.init) + let typeArr2 = typeArr[1].characters.split{$0 == ">"}.map(String.init) + dictionary[child.label!] = typeArr2[0] + } + + } + + return dictionary + + } + + func castType(_ type: String, value: AnyObject?, property: String){ + + let v = nullToNil(value) + + if(v != nil){ + var val = toString(value!) + switch(type){ + case "String": + setValue(val, forKey: property) + break + + case "String, String": + val = val.replacingOccurrences(of: "{\n", with: "") + val = val.replacingOccurrences(of: "\n}", with: "") + val = val.replacingOccurrences(of: " ", with: "") + let array = val.components(separatedBy: ";\n") + var dictionary: Dictionary = Dictionary() + for a in array{ + let data = a.components(separatedBy: " = ") + dictionary[data[0].replacingOccurrences(of: ";", with: "")] = data[1].replacingOccurrences(of: ";", with: "") + } + + print(dictionary) + break + + case "NSNumber": + let nVal = Double(val)! + if(nVal.truncatingRemainder(dividingBy: 1) == 0) + { + setValue(NSNumber(value: Int(nVal) as Int), forKey: property) + } + else{ + setValue(NSNumber(value: nVal as Double), forKey: property) + } + break + + default: + break + } + } + } + + func nullToNil(_ value : AnyObject?) -> AnyObject? { + if value is NSNull { + return nil + } else { + return value + } + } + + func toString(_ value: AnyObject) -> String{ + return "\(value)" + } + + func toBool(_ value: String) -> Bool? { + switch (value){ + case "True", "true", "yes", "1": + return true + case "False", "false", "no", "0": + return false + default: + return nil + } + } +} + + diff --git a/BaseLibrary/BaseLibrary/Resources/Strings/ca.lproj/LocalizableBase.strings b/BaseLibrary/BaseLibrary/Resources/Strings/ca.lproj/LocalizableBase.strings new file mode 100644 index 0000000..e18f73f --- /dev/null +++ b/BaseLibrary/BaseLibrary/Resources/Strings/ca.lproj/LocalizableBase.strings @@ -0,0 +1,20 @@ +/* + Localizable.strings + BaseLibrary + + Created by Nelo Sanchez Gomiz on 4/3/16. + Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +*/ + + +/* */ +"error" = "Error"; + +/* */ +"accept" = "Aceptar"; + +/* */ +"retry" = "Reintentar"; + +/* */ +"no_internet" = "No hi ha connexió a internet"; diff --git a/BaseLibrary/BaseLibrary/Resources/Strings/en.lproj/LocalizableBase.strings b/BaseLibrary/BaseLibrary/Resources/Strings/en.lproj/LocalizableBase.strings new file mode 100644 index 0000000..60233a0 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Resources/Strings/en.lproj/LocalizableBase.strings @@ -0,0 +1,20 @@ +/* + Localizable.strings + BaseLibrary + + Created by Nelo Sanchez Gomiz on 4/3/16. + Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +*/ + + +/* */ +"error" = "Error"; + +/* */ +"accept" = "Acept"; + +/* */ +"retry" = "Retry"; + +/* */ +"no_internet" = "No internet"; diff --git a/BaseLibrary/BaseLibrary/Resources/Strings/es.lproj/LocalizableBase.strings b/BaseLibrary/BaseLibrary/Resources/Strings/es.lproj/LocalizableBase.strings new file mode 100644 index 0000000..dad4645 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Resources/Strings/es.lproj/LocalizableBase.strings @@ -0,0 +1,20 @@ +/* + Localizable.strings + BaseLibrary + + Created by Nelo Sanchez Gomiz on 4/3/16. + Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +*/ + + +/* */ +"error" = "Error"; + +/* */ +"accept" = "Aceptar"; + +/* */ +"retry" = "Reintentar"; + +/* */ +"no_internet" = "No hay conexión a internet"; diff --git a/BaseLibrary/BaseLibrary/Resources/Strings/pt.lproj/LocalizableBase.strings b/BaseLibrary/BaseLibrary/Resources/Strings/pt.lproj/LocalizableBase.strings new file mode 100644 index 0000000..f4a5516 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Resources/Strings/pt.lproj/LocalizableBase.strings @@ -0,0 +1,20 @@ +/* + Localizable.strings + BaseLibrary + + Created by Nelo Sanchez Gomiz on 4/3/16. + Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +*/ + + +/* */ +"error" = "Error"; + +/* */ +"accept" = "Aceptar"; + +/* */ +"retry" = "Reintentar"; + +/* */ +"no_internet" = "Sem conexão à Internet"; diff --git a/BaseLibrary/BaseLibrary/Views/MyView.swift b/BaseLibrary/BaseLibrary/Views/MyView.swift new file mode 100644 index 0000000..24cda60 --- /dev/null +++ b/BaseLibrary/BaseLibrary/Views/MyView.swift @@ -0,0 +1,88 @@ +// +// MyView.swift +// BaseLibrary +// +// Created by Nelo Sanchez Gomiz on 4/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +open class MyView: UIViewController { + + open var progress: UIActivityIndicatorView? + open var contenedor: UIView? + open var ejecutador: Ejecutador? + + open override func viewDidLoad() { + ejecutador = Ejecutador.getInstance() + createView() + } + + open override func viewWillAppear(_ animated: Bool) { + prepareView() + } + + open override func viewWillDisappear(_ animated: Bool) { + ejecutador!.removeCommands() + } + + open func showProgress(_ show: Bool) { + showProgressBar(show) + showContenedor(show) + } + + open func showProgressBar(_ show: Bool) + { + if(progress != nil) + { + if(show) + { + progress!.startAnimating() + progress!.isHidden = false + + } + else + { + progress!.stopAnimating() + progress!.isHidden = true + } + + } + + } + + open func showContenedor(_ show: Bool) + { + if(contenedor != nil) + { + contenedor!.isHidden = show + } + } + + + open func createView(){ + showProgress(false) + setTitles() + } + + open func prepareView(){} + + open func setTitles(){} + + open func execute(_ cmd: CommandBase) + { + ejecutador!.exeute(cmd, view: self) + } + + open func launchSegue(_ segue: String){ + performSegue(withIdentifier: segue, sender: self) + } + + open func launchSegue(_ segue: String, sender: AnyObject?) + { + performSegue(withIdentifier: segue, sender: sender) + } + + +} diff --git a/BaseLibrary/BaseLibraryTests/BaseLibraryTests.swift b/BaseLibrary/BaseLibraryTests/BaseLibraryTests.swift new file mode 100644 index 0000000..7de5e3b --- /dev/null +++ b/BaseLibrary/BaseLibraryTests/BaseLibraryTests.swift @@ -0,0 +1,36 @@ +// +// BaseLibraryTests.swift +// BaseLibraryTests +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import XCTest +@testable import BaseLibrary + +class BaseLibraryTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/BaseLibrary/BaseLibraryTests/Info.plist b/BaseLibrary/BaseLibraryTests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/BaseLibrary/BaseLibraryTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/Verdnaturaventas/Podfile b/Verdnaturaventas/Podfile new file mode 100644 index 0000000..c367ba8 --- /dev/null +++ b/Verdnaturaventas/Podfile @@ -0,0 +1,6 @@ +use_frameworks! + +platform :ios, '8.0' +pod 'FSCalendar' + + diff --git a/Verdnaturaventas/Podfile.lock b/Verdnaturaventas/Podfile.lock new file mode 100644 index 0000000..135149a --- /dev/null +++ b/Verdnaturaventas/Podfile.lock @@ -0,0 +1,10 @@ +PODS: + - FSCalendar (2.0.1) + +DEPENDENCIES: + - FSCalendar + +SPEC CHECKSUMS: + FSCalendar: 18117308f5876a8f6f0fe572085d543580c2c5e5 + +COCOAPODS: 0.39.0 diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/CALayer+FSExtension.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/CALayer+FSExtension.h new file mode 100644 index 0000000..d4063b3 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/CALayer+FSExtension.h @@ -0,0 +1,21 @@ +// +// CALayer+FSExtension.h +// FSCalendar +// +// Created by dingwenchao on 2/3/16. +// Copyright © 2016 wenchaoios. All rights reserved. +// + +#import + +@interface CALayer (FSExtension) + +@property (nonatomic) CGFloat fs_width; +@property (nonatomic) CGFloat fs_height; + +@property (nonatomic) CGFloat fs_top; +@property (nonatomic) CGFloat fs_left; +@property (nonatomic) CGFloat fs_bottom; +@property (nonatomic) CGFloat fs_right; + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/CALayer+FSExtension.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/CALayer+FSExtension.m new file mode 100644 index 0000000..9ed50a5 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/CALayer+FSExtension.m @@ -0,0 +1,73 @@ +// +// CALayer+FSExtension.m +// FSCalendar +// +// Created by dingwenchao on 2/3/16. +// Copyright © 2016 wenchaoios. All rights reserved. +// + +#import "CALayer+FSExtension.h" + +@implementation CALayer (FSExtension) + +- (CGFloat)fs_width +{ + return CGRectGetWidth(self.frame); +} + +- (void)setFs_width:(CGFloat)fs_width +{ + self.frame = CGRectMake(self.fs_left, self.fs_top, fs_width, self.fs_height); +} + +- (CGFloat)fs_height +{ + return CGRectGetHeight(self.frame); +} + +- (void)setFs_height:(CGFloat)fs_height +{ + self.frame = CGRectMake(self.fs_left, self.fs_top, self.fs_width, fs_height); +} + +- (CGFloat)fs_top +{ + return CGRectGetMinY(self.frame); +} + +- (void)setFs_top:(CGFloat)fs_top +{ + self.frame = CGRectMake(self.fs_left, fs_top, self.fs_width, self.fs_height); +} + +- (CGFloat)fs_bottom +{ + return CGRectGetMaxY(self.frame); +} + +- (void)setFs_bottom:(CGFloat)fs_bottom +{ + self.fs_top = fs_bottom - self.fs_height; +} + +- (CGFloat)fs_left +{ + return CGRectGetMinX(self.frame); +} + +- (void)setFs_left:(CGFloat)fs_left +{ + self.frame = CGRectMake(fs_left, self.fs_top, self.fs_width, self.fs_height); +} + +- (CGFloat)fs_right +{ + return CGRectGetMaxX(self.frame); +} + +- (void)setFs_right:(CGFloat)fs_right +{ + self.fs_left = self.fs_right - self.fs_width; +} + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar+IBExtension.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar+IBExtension.h new file mode 100644 index 0000000..9b18a9e --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar+IBExtension.h @@ -0,0 +1,55 @@ +// +// FSCalendar+IBExtension.h +// FSCalendar +// +// Created by Wenchao Ding on 8/14/15. +// Copyright © 2016 Wenchao Ding. All rights reserved. +// +// 注意: 这些方法仅仅为了在IB中使用,不建议直接调用。这些方法在calendar.appearance中使用。如: calendar.appearance.eventColor +// Warning: For IB usage only. Directly calling these methods is deprecated. Use calendar.appearance(FSCalendarAppearance) instead + +#import "FSCalendar.h" +#import "FSCalendarConstance.h" + +IB_DESIGNABLE +@interface FSCalendar (IBExtension) + +@property (assign, nonatomic) IBInspectable BOOL adjustsFontSizeToFitContentSize; +@property (assign, nonatomic) IBInspectable CGFloat titleTextSize; +@property (assign, nonatomic) IBInspectable CGFloat subtitleTextSize; +@property (assign, nonatomic) IBInspectable CGFloat weekdayTextSize; +@property (assign, nonatomic) IBInspectable CGFloat headerTitleTextSize; + +@property (strong, nonatomic) IBInspectable UIColor *eventColor; +@property (strong, nonatomic) IBInspectable UIColor *weekdayTextColor; + +@property (strong, nonatomic) IBInspectable UIColor *headerTitleColor; +@property (strong, nonatomic) IBInspectable NSString *headerDateFormat; +@property (assign, nonatomic) IBInspectable CGFloat headerMinimumDissolvedAlpha; + +@property (strong, nonatomic) IBInspectable UIColor *titleDefaultColor; +@property (strong, nonatomic) IBInspectable UIColor *titleSelectionColor; +@property (strong, nonatomic) IBInspectable UIColor *titleTodayColor; +@property (strong, nonatomic) IBInspectable UIColor *titlePlaceholderColor; +@property (strong, nonatomic) IBInspectable UIColor *titleWeekendColor; + +@property (strong, nonatomic) IBInspectable UIColor *subtitleDefaultColor; +@property (strong, nonatomic) IBInspectable UIColor *subtitleSelectionColor; +@property (strong, nonatomic) IBInspectable UIColor *subtitleTodayColor; +@property (strong, nonatomic) IBInspectable UIColor *subtitlePlaceholderColor; +@property (strong, nonatomic) IBInspectable UIColor *subtitleWeekendColor; + +@property (strong, nonatomic) IBInspectable UIColor *selectionColor; +@property (strong, nonatomic) IBInspectable UIColor *todayColor; +@property (strong, nonatomic) IBInspectable UIColor *todaySelectionColor; + +@property (strong, nonatomic) IBInspectable UIColor *borderDefaultColor; +@property (strong, nonatomic) IBInspectable UIColor *borderSelectionColor; + +@property (assign, nonatomic) IBInspectable FSCalendarCellShape cellShape; +@property (assign, nonatomic) IBInspectable BOOL useVeryShortWeekdaySymbols; + +@property (assign, nonatomic) IBInspectable BOOL fakeSubtitles; +@property (assign, nonatomic) IBInspectable NSInteger fakedSelectedDay; + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar+IBExtension.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar+IBExtension.m new file mode 100644 index 0000000..33bf403 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar+IBExtension.m @@ -0,0 +1,378 @@ +// +// FSCalendar+IBExtension.m +// FSCalendar +// +// Created by Wenchao Ding on 8/14/15. +// Copyright © 2016 Wenchao Ding. All rights reserved. +// + +#import "FSCalendar+IBExtension.h" + +@implementation FSCalendar (IBExtension) +#if !TARGET_INTERFACE_BUILDER +@dynamic fakedSelectedDay,fakeSubtitles; +#endif + +#pragma mark - adjustsFontSizeToFitContentSize + +- (void)setAdjustsFontSizeToFitContentSize:(BOOL)adjustsFontSizeToFitContentSize +{ + self.appearance.adjustsFontSizeToFitContentSize = adjustsFontSizeToFitContentSize; +} + +- (BOOL)adjustsFontSizeToFitContentSize +{ + return self.appearance.adjustsFontSizeToFitContentSize; +} + +#pragma mark - eventColor + +- (void)setEventColor:(UIColor *)eventColor +{ + self.appearance.eventColor = eventColor; +} + +- (UIColor *)eventColor +{ + return self.appearance.eventColor; +} + +#pragma mark - weekdayTextColor + +- (void)setWeekdayTextColor:(UIColor *)weekdayTextColor +{ + self.appearance.weekdayTextColor = weekdayTextColor; +} + +- (UIColor *)weekdayTextColor +{ + return self.appearance.weekdayTextColor; +} + +#pragma mark - headerTitleColor + +- (void)setHeaderTitleColor:(UIColor *)headerTitleColor +{ + self.appearance.headerTitleColor = headerTitleColor; +} + +- (UIColor *)headerTitleColor +{ + return self.appearance.headerTitleColor; +} + +#pragma mark - headerDateFormat + +- (void)setHeaderDateFormat:(NSString *)headerDateFormat +{ + self.appearance.headerDateFormat = headerDateFormat; +} + +- (NSString *)headerDateFormat +{ + return self.appearance.headerDateFormat; +} + +#pragma mark - headerMinimumDissolvedAlpha + +- (void)setHeaderMinimumDissolvedAlpha:(CGFloat)headerMinimumDissolvedAlpha +{ + self.appearance.headerMinimumDissolvedAlpha = headerMinimumDissolvedAlpha; +} + +- (CGFloat)headerMinimumDissolvedAlpha +{ + return self.appearance.headerMinimumDissolvedAlpha; +} + +#pragma mark - titleDefaultColor + +- (void)setTitleDefaultColor:(UIColor *)titleDefaultColor +{ + self.appearance.titleDefaultColor = titleDefaultColor; +} + +- (UIColor *)titleDefaultColor +{ + return self.appearance.titleDefaultColor; +} + +#pragma mark - titleSelectionColor + +- (void)setTitleSelectionColor:(UIColor *)titleSelectionColor +{ + self.appearance.titleSelectionColor = titleSelectionColor; +} + +- (UIColor *)titleSelectionColor +{ + return self.appearance.titleSelectionColor; +} + +#pragma mark - titleTodayColor + +- (void)setTitleTodayColor:(UIColor *)titleTodayColor +{ + self.appearance.titleTodayColor = titleTodayColor; +} + +- (UIColor *)titleTodayColor +{ + return self.appearance.titleTodayColor; +} + +#pragma mark - titlePlaceholderColor + +- (void)setTitlePlaceholderColor:(UIColor *)titlePlaceholderColor +{ + self.appearance.titlePlaceholderColor = titlePlaceholderColor; +} + +- (UIColor *)titlePlaceholderColor +{ + return self.appearance.titlePlaceholderColor; +} + +#pragma mark - titleWeekendColor + +- (void)setTitleWeekendColor:(UIColor *)titleWeekendColor +{ + self.appearance.titleWeekendColor = titleWeekendColor; +} + +- (UIColor *)titleWeekendColor +{ + return self.appearance.titleWeekendColor; +} + +#pragma mark - subtitleDefaultColor + +- (void)setSubtitleDefaultColor:(UIColor *)subtitleDefaultColor +{ + self.appearance.subtitleDefaultColor = subtitleDefaultColor; +} + +- (UIColor *)subtitleDefaultColor +{ + return self.appearance.subtitleDefaultColor; +} + +#pragma mark - subtitleSelectionColor + +- (void)setSubtitleSelectionColor:(UIColor *)subtitleSelectionColor +{ + self.appearance.subtitleSelectionColor = subtitleSelectionColor; +} + +- (UIColor *)subtitleSelectionColor +{ + return self.appearance.subtitleSelectionColor; +} + +#pragma mark - subtitleTodayColor + +- (void)setSubtitleTodayColor:(UIColor *)subtitleTodayColor +{ + self.appearance.subtitleTodayColor = subtitleTodayColor; +} + +- (UIColor *)subtitleTodayColor +{ + return self.appearance.subtitleTodayColor; +} + +#pragma mark - subtitlePlaceholderColor + +- (void)setSubtitlePlaceholderColor:(UIColor *)subtitlePlaceholderColor +{ + self.appearance.subtitlePlaceholderColor = subtitlePlaceholderColor; +} + +- (UIColor *)subtitlePlaceholderColor +{ + return self.appearance.subtitlePlaceholderColor; +} + +#pragma mark - subtitleWeekendColor + +- (void)setSubtitleWeekendColor:(UIColor *)subtitleWeekendColor +{ + self.appearance.subtitleWeekendColor = subtitleWeekendColor; +} + +- (UIColor *)subtitleWeekendColor +{ + return self.appearance.subtitleWeekendColor; +} + +#pragma mark - selectionColor + +- (void)setSelectionColor:(UIColor *)selectionColor +{ + self.appearance.selectionColor = selectionColor; +} + +- (UIColor *)selectionColor +{ + return self.appearance.selectionColor; +} + +#pragma mark - todayColor + +- (void)setTodayColor:(UIColor *)todayColor +{ + self.appearance.todayColor = todayColor; +} + +- (UIColor *)todayColor +{ + return self.appearance.todayColor; +} + +#pragma mark - todaySelectionColor + +- (void)setTodaySelectionColor:(UIColor *)todaySelectionColor +{ + self.appearance.todaySelectionColor = todaySelectionColor; +} + +- (UIColor *)todaySelectionColor +{ + return self.appearance.todaySelectionColor; +} + +#pragma mark - borderDefaultColor + +- (void)setBorderDefaultColor:(UIColor *)borderDefaultColor +{ + self.appearance.borderDefaultColor = borderDefaultColor; +} + +- (UIColor *)borderDefaultColor +{ + return self.appearance.borderDefaultColor; +} + +#pragma mark - borderSelectionColor + +- (void)setBorderSelectionColor:(UIColor *)borderSelectionColor +{ + self.appearance.borderSelectionColor = borderSelectionColor; +} + +- (UIColor *)borderSelectionColor +{ + return self.appearance.borderSelectionColor; +} + +#pragma mark - cellStyle + +- (void)setCellShape:(FSCalendarCellShape)cellShape +{ + self.appearance.cellShape = cellShape; +} + +- (FSCalendarCellShape)cellShape +{ + return self.appearance.cellShape; +} + +#pragma mark - useVeryShortWeekdaySymbols + +- (void)setUseVeryShortWeekdaySymbols:(BOOL)useVeryShortWeekdaySymbols +{ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + self.appearance.useVeryShortWeekdaySymbols = useVeryShortWeekdaySymbols; +#pragma GCC diagnostic pop +} + +- (BOOL)useVeryShortWeekdaySymbols +{ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + return self.appearance.useVeryShortWeekdaySymbols; +#pragma GCC diagnostic pop +} + + +#pragma mark - fakeSubtitles + +- (void)setFakeSubtitles:(BOOL)fakeSubtitles +{ +#if TARGET_INTERFACE_BUILDER + self.appearance.fakeSubtitles = fakeSubtitles; +#endif +} + +#if TARGET_INTERFACE_BUILDER +- (BOOL)fakeSubtitles +{ + return self.appearance.fakeSubtitles; +} +#endif + +#pragma mark - fakedSelectedDay + +- (void)setFakedSelectedDay:(NSInteger)fakedSelectedDay +{ +#if TARGET_INTERFACE_BUILDER + self.appearance.fakedSelectedDay = fakedSelectedDay; +#endif +} + + +#if TARGET_INTERFACE_BUILDER +- (NSInteger)fakedSelectedDay +{ + return self.appearance.fakedSelectedDay; +} +#endif + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +- (void)setTitleTextSize:(CGFloat)titleTextSize +{ + self.appearance.titleTextSize = titleTextSize; +} + +- (CGFloat)titleTextSize +{ + return self.appearance.titleTextSize; +} + + +- (void)setSubtitleTextSize:(CGFloat)subtitleTextSize +{ + self.appearance.subtitleTextSize = subtitleTextSize; +} + +- (CGFloat)subtitleTextSize +{ + return self.appearance.subtitleTextSize; +} + +- (void)setWeekdayTextSize:(CGFloat)weekdayTextSize +{ + self.appearance.weekdayTextSize = weekdayTextSize; +} + +- (CGFloat)weekdayTextSize +{ + return self.appearance.weekdayTextSize; +} + +- (void)setHeaderTitleTextSize:(CGFloat)headerTitleTextSize +{ + self.appearance.headerTitleTextSize = headerTitleTextSize; +} + +- (CGFloat)headerTitleTextSize +{ + return self.appearance.headerTitleTextSize; +} + +#pragma GCC diagnostic pop + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar.h new file mode 100644 index 0000000..c86d649 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar.h @@ -0,0 +1,598 @@ +// +// FSCalendar.h +// FSCalendar +// +// Created by Wenchao Ding on 29/1/15. +// Copyright © 2016 Wenchao Ding. All rights reserved. +// +// https://github.com/WenchaoD +// + +#import +#import "FSCalendarAppearance.h" +#import "FSCalendarConstance.h" + +/** + * FSCalendar is a superior awesome calendar control with high performance, high customizablility and very simple usage. + * + * @warning All NSDate instances used in the calendar should be managed by the DateTools category. See FSCalendar+DateTools. + * + * @see FSCalendarDataSource + * @see FSCalendarDelegate + * @see FSCalendarDelegateAppearance + * @see FSCalendarAppearance + * @see FSCalendar+DateTools + */ + +//! Project version number for FSCalendar. +FOUNDATION_EXPORT double FSCalendarVersionNumber; + +//! Project version string for FSCalendar. +FOUNDATION_EXPORT const unsigned char FSCalendarVersionString[]; + +typedef NS_ENUM(NSUInteger, FSCalendarScope) { + FSCalendarScopeMonth, + FSCalendarScopeWeek +}; + +typedef NS_ENUM(NSUInteger, FSCalendarScrollDirection) { + FSCalendarScrollDirectionVertical, + FSCalendarScrollDirectionHorizontal +}; + +typedef NS_ENUM(NSUInteger, FSCalendarUnit) { + FSCalendarUnitMonth = NSCalendarUnitMonth, + FSCalendarUnitWeekOfYear = NSCalendarUnitWeekOfYear, + FSCalendarUnitDay = NSCalendarUnitDay +}; + +NS_ASSUME_NONNULL_BEGIN + +@class FSCalendar; + +/** + * FSCalendarDataSource is a source set of FSCalendar. The basic job is to provide event、subtitle and min/max day to display for calendar. + */ +@protocol FSCalendarDataSource + +@optional + +/** + * Asks the dataSource for a subtitle for the specific date under the day text. + */ +- (nullable NSString *)calendar:(FSCalendar *)calendar subtitleForDate:(NSDate *)date; + +/** + * Asks the dataSource for an image for the specific date. + */ +- (nullable UIImage *)calendar:(FSCalendar *)calendar imageForDate:(NSDate *)date; + +/** + * Asks the dataSource the minimum date to display. + */ +- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar; + +/** + * Asks the dataSource the maximum date to display. + */ +- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar; + +/** + * Asks the dataSource the number of event dots for a specific date. + * + * @see + * + * - (UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance eventColorForDate:(NSDate *)date; + * - (NSArray *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance eventColorsForDate:(NSDate *)date; + */ +- (NSInteger)calendar:(FSCalendar *)calendar numberOfEventsForDate:(NSDate *)date; + +/** + * This function is deprecated + */ +- (BOOL)calendar:(FSCalendar *)calendar hasEventForDate:(NSDate *)date FSCalendarDeprecated(-calendar:numberOfEventsForDate:); + +@end + + +/** + * The delegate of a FSCalendar object must adopt the FSCalendarDelegate protocol. The optional methods of FSCalendarDelegate manage selections、 user events and help to manager the frame of the calendar. + */ +@protocol FSCalendarDelegate + +@optional + +/** + * Asks the delegate whether the specific date is allowed to be selected by tapping. + */ +- (BOOL)calendar:(FSCalendar *)calendar shouldSelectDate:(NSDate *)date; + +/** + * Tells the delegate a date in the calendar is selected by tapping. + */ +- (void)calendar:(FSCalendar *)calendar didSelectDate:(NSDate *)date; + +/** + * Asks the delegate whether the specific date is allowed to be deselected by tapping. + */ +- (BOOL)calendar:(FSCalendar *)calendar shouldDeselectDate:(NSDate *)date; + +/** + * Tells the delegate a date in the calendar is deselected by tapping. + */ +- (void)calendar:(FSCalendar *)calendar didDeselectDate:(NSDate *)date; + +/** + * Tells the delegate the calendar is about to change the bounding rect. + */ +- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated; + +/** + * Tells the delegate the calendar is about to change the current page. + */ +- (void)calendarCurrentPageDidChange:(FSCalendar *)calendar; + +/** + * These functions are deprecated + */ +- (void)calendarCurrentScopeWillChange:(FSCalendar *)calendar animated:(BOOL)animated FSCalendarDeprecated(-calendar:boundingRectWillChange:animated:); +- (void)calendarCurrentMonthDidChange:(FSCalendar *)calendar FSCalendarDeprecated(-calendarCurrentPageDidChange:); + +@end + +/** + * FSCalendarDelegateAppearance determines the fonts and colors of components in the calendar, but more specificly. Basely, if you need to make a global customization of appearance of the calendar, use FSCalendarAppearance. But if you need different appearance for different day, use FSCalendarDelegateAppearance. + * + * @see FSCalendarAppearance + */ +@protocol FSCalendarDelegateAppearance + +@optional + +/** + * Asks the delegate for a fill color in selected state for the specific date. + */ +- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance selectionColorForDate:(NSDate *)date; + +/** + * Asks the delegate for day text color in unselected state for the specific date. + */ +- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance titleDefaultColorForDate:(NSDate *)date; + +/** + * Asks the delegate for day text color in selected state for the specific date. + */ +- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance titleSelectionColorForDate:(NSDate *)date; + +/** + * Asks the delegate for subtitle text color in unselected state for the specific date. + */ +- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance subtitleDefaultColorForDate:(NSDate *)date; + +/** + * Asks the delegate for subtitle text color in selected state for the specific date. + */ +- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance subtitleSelectionColorForDate:(NSDate *)date; + +/** + * Asks the delegate for single event color for the specific date. + */ +- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance eventColorForDate:(NSDate *)date; + +/** + * Asks the delegate for multiple event colors for the specific date. + */ +- (nullable NSArray *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance eventColorsForDate:(NSDate *)date; + +/** + * Asks the delegate for a border color in unselected state for the specific date. + */ +- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance borderDefaultColorForDate:(NSDate *)date; + +/** + * Asks the delegate for a border color in selected state for the specific date. + */ +- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance borderSelectionColorForDate:(NSDate *)date; + +/** + * Asks the delegate for a shape for the specific date. + */ +- (FSCalendarCellShape)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance cellShapeForDate:(NSDate *)date; + +/** + * This function is deprecated + */ +- (FSCalendarCellStyle)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance cellStyleForDate:(NSDate *)date FSCalendarDeprecated(-calendar:appearance:cellShapeForDate:); + +@end + +#pragma mark - Primary + +IB_DESIGNABLE +@interface FSCalendar : UIView + +/** + * The object that acts as the delegate of the calendar. + */ +@property (weak, nonatomic) IBOutlet id delegate; + +/** + * The object that acts as the data source of the calendar. + */ +@property (weak, nonatomic) IBOutlet id dataSource; + +/** + * A special mark will be put on today of the calendar + */ +@property (strong, nonatomic) NSDate *today; + +/** + * The current page of calendar + * + * @desc In week mode, current page represents the current visible week; In month mode, it means current visible month. + */ +@property (strong, nonatomic) NSDate *currentPage; + +/** + * The locale of month and weekday symbols. Change it to display them in your own language. + * + * e.g. To display them in Chinese: + * + * calendar.locale = [NSLocale localeWithLocaleIdentifier:@"zh-CN"]; + */ +@property (strong, nonatomic) NSLocale *locale; + +/** + * Represents the NSCalendarIdentifier of calendar. Default is NSCalendarIdentifierGregorian. + * + * e.g. To display a Persian calendar + * + * calendar.identifier = NSCalendarIdentifierPersian; + */ +@property (strong, nonatomic) NSString *identifier; + +/** + * The scroll direction of FSCalendar. + * + * e.g. To make the calendar scroll vertically + * + * calendar.scrollDirection = FSCalendarScrollDirectionVertical; + */ +@property (assign, nonatomic) FSCalendarScrollDirection scrollDirection; + +/** + * The scope of calendar, change scope will trigger an inner frame change, make sure the frame has been correctly adjusted in + * + * - (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated; + */ +@property (assign, nonatomic) FSCalendarScope scope; + +/** + * The index of the first weekday of the calendar. Give a '2' to make Monday in the first column. + */ +@property (assign, nonatomic) IBInspectable NSUInteger firstWeekday; + +/** + * The height of month header of the calendar. Give a '0' to remove the header. + */ +@property (assign, nonatomic) IBInspectable CGFloat headerHeight; + +/** + * The height of weekday header of the calendar. + */ +@property (assign, nonatomic) IBInspectable CGFloat weekdayHeight; + +/** + * A Boolean value that determines whether users can select a date. + */ +@property (assign, nonatomic) IBInspectable BOOL allowsSelection; + +/** + * A Boolean value that determines whether users can select more than one date. + */ +@property (assign, nonatomic) IBInspectable BOOL allowsMultipleSelection; + +/** + * A Boolean value that determines whether paging is enabled for the calendar. + */ +@property (assign, nonatomic) IBInspectable BOOL pagingEnabled; + +/** + * A Boolean value that determines whether scrolling is enabled for the calendar. + */ +@property (assign, nonatomic) IBInspectable BOOL scrollEnabled; + +/** + * A Boolean value that determines whether scoping animation is centered a visible selected date. Default is YES. + */ +@property (assign, nonatomic) IBInspectable BOOL focusOnSingleSelectedDate; + +/** + * A Boolean value that determines whether the calendar should show days out of month. Default is YES. + */ +@property (assign, nonatomic) IBInspectable BOOL showsPlaceholders; + +@property (readonly, nonatomic) FSCalendarAppearance *appearance; + +/** + * A date object representing the minimum day enable、visible and selectable. (read-only) + */ +@property (readonly, nonatomic) NSDate *minimumDate; + +/** + * A date object representing the maximum day enable、visible and selectable. (read-only) + */ +@property (readonly, nonatomic) NSDate *maximumDate; + +/** + * A date object identifying the section of the selected date. (read-only) + */ +@property (readonly, nonatomic) NSDate *selectedDate; + +/** + * The dates representing the selected dates. (read-only) + */ +@property (readonly, nonatomic) NSArray *selectedDates; + +/** + * Reload the dates and appearance of the calendar. + */ +- (void)reloadData; + +/** + * Change the scope of the calendar. Make sure `-calendar:boundingRectWillChange:animated` is correctly adopted. + * + * @param scope The target scope to change. + * @param animated YES if you want to animate the scoping; NO if the change should be immediate. + */ +- (void)setScope:(FSCalendarScope)scope animated:(BOOL)animated; + +/** + * Selects a given date in the calendar. + * + * @param date A date in the calendar. + */ +- (void)selectDate:(NSDate *)date; + +/** + * Selects a given date in the calendar, optionally scrolling the date to visible area. + * + * @param date A date in the calendar. + * @param scrollToDate A Boolean value that determines whether the calendar should scroll to the selected date to visible area. + */ +- (void)selectDate:(NSDate *)date scrollToDate:(BOOL)scrollToDate; + +/** + * Deselects a given date of the calendar. + * @param date A date in the calendar. + */ +- (void)deselectDate:(NSDate *)date; + +/** + * Change the current page of the calendar. + * + * @param currentPage Representing weekOfYear in week mode, or month in month mode. + * @param animated YES if you want to animate the change in position; NO if it should be immediate. + */ +- (void)setCurrentPage:(NSDate *)currentPage animated:(BOOL)animated; + +@end + +#pragma mark - DateTools + +/** + * Job for this category: + * + * 1. Manage date object simplier、faster + * 2. Bring date object into a no-timezone system. + * + * @warning All NSDate instances used in the calendar should be created by: + * + * - (NSDate *)dateFromString:(NSString *)string format:(NSString *)format; + * - (NSDate *)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day; + * + */ +@interface FSCalendar (DateTools) + +/** + * Returns the number of year of the given date + */ +- (NSInteger)yearOfDate:(NSDate *)date; + +/** + * Returns the number of month of the given date + */ +- (NSInteger)monthOfDate:(NSDate *)date; + +/** + * Returns the number of day of the given date + */ +- (NSInteger)dayOfDate:(NSDate *)date; + +/** + * Returns the number of weekday of the given date + */ +- (NSInteger)weekdayOfDate:(NSDate *)date; + +/** + * Returns the number of weekOfYear of the given date + */ +- (NSInteger)weekOfDate:(NSDate *)date; + +/** + * Returns the number of hour of the given date + */ +- (NSInteger)hourOfDate:(NSDate *)date; + +/** + * Returns the number of minite of the given date + */ +- (NSInteger)miniuteOfDate:(NSDate *)date; + +/** + * Returns the number of seconds of the given date + */ +- (NSInteger)secondOfDate:(NSDate *)date; + +/** + * Returns the number of rows of the given month + */ +- (NSInteger)numberOfRowsInMonth:(NSDate *)month; + +/** + * Zeronizing hour、minute and second components of the given date + */ +- (NSDate *)dateByIgnoringTimeComponentsOfDate:(NSDate *)date; + +/** + * Returns the first day of month of the given date + */ +- (NSDate *)beginingOfMonthOfDate:(NSDate *)date; + +/** + * Returns the last day of month of the given date + */ +- (NSDate *)endOfMonthOfDate:(NSDate *)date; + +/** + * Returns the first day of week of the given date + */ +- (NSDate *)beginingOfWeekOfDate:(NSDate *)date; + +/** + * Returns the middle day of week of the given date + */ +- (NSDate *)middleOfWeekFromDate:(NSDate *)date; + +/** + * Returns the next day of the given date + */ +- (NSDate *)tomorrowOfDate:(NSDate *)date; + +/** + * Returns the previous day of the given date + */ +- (NSDate *)yesterdayOfDate:(NSDate *)date; + +/** + * Returns the number of days in the month of the given date + */ +- (NSInteger)numberOfDatesInMonthOfDate:(NSDate *)date; + +/** + * Instantiating a date by given string and date format. + * + * e.g. + * + * NSDate *date = [calendar dateFromString:@"2000-10-10" format:@"yyyy-MM-dd"]; + */ +- (NSDate *)dateFromString:(NSString *)string format:(NSString *)format; + +/** + * Instantiating a date by given numbers of year、month and day. + * + * e.g. + * + * NSDate *date = [calendar dateWithYear:2000 month:10 day:10]; + */ +- (NSDate *)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day; + +/** + * Returns a new NSDate object representing the time calculated by adding given number of year to a given date. + */ +- (NSDate *)dateByAddingYears:(NSInteger)years toDate:(NSDate *)date; + +/** + * Returns a new NSDate object representing the time calculated by substracting given number of year from a given date. + */ +- (NSDate *)dateBySubstractingYears:(NSInteger)years fromDate:(NSDate *)date; + +/** + * Returns a new NSDate object representing the time calculated by adding given number of month to a given date. + */ +- (NSDate *)dateByAddingMonths:(NSInteger)months toDate:(NSDate *)date; + +/** + * Returns a new NSDate object representing the time calculated by substracting given number of month from a given date. + */ +- (NSDate *)dateBySubstractingMonths:(NSInteger)months fromDate:(NSDate *)date; + +/** + * Returns a new NSDate object representing the time calculated by adding given number of week to a given date. + */ +- (NSDate *)dateByAddingWeeks:(NSInteger)weeks toDate:(NSDate *)date; + +/** + * Returns a new NSDate object representing the time calculated by substracting given number of week from a given date. + */ +- (NSDate *)dateBySubstractingWeeks:(NSInteger)weeks fromDate:(NSDate *)date; + +/** + * Returns a new NSDate object representing the time calculated by adding given number of day to a given date. + */ +- (NSDate *)dateByAddingDays:(NSInteger)days toDate:(NSDate *)date; + +/** + * Returns a new NSDate object representing the time calculated by substracting given number of day from a given date. + */ +- (NSDate *)dateBySubstractingDays:(NSInteger)days fromDate:(NSDate *)date; + +/** + * Returns the year-difference between the given dates + */ +- (NSInteger)yearsFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate; + +/** + * Returns the month-difference between the given dates + */ +- (NSInteger)monthsFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate; + +/** + * Returns the day-difference between the given dates + */ +- (NSInteger)daysFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate; + +/** + * Returns the week-difference between the given dates + */ +- (NSInteger)weeksFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate; + +/** + * Returns whether two dates are equal to a given unit of calendar. + */ +- (BOOL)isDate:(NSDate *)date1 equalToDate:(NSDate *)date2 toCalendarUnit:(FSCalendarUnit)unit; + +/** + * Returns whether the given date is in 'today' of the calendar. + */ +- (BOOL)isDateInToday:(NSDate *)date; + +/** + * Returns a string representation of a given date formatted using a specific date format. + */ +- (NSString *)stringFromDate:(NSDate *)date format:(NSString *)format; + +/** + * Returns a string representation of a given date formatted using a yyyy-MM-dd. + */ +- (NSString *)stringFromDate:(NSDate *)date; + +@end + +#pragma mark - Deprecate + +/** + * These attributes and functions are deprecated. + */ +@interface FSCalendar (Deprecated) +@property (strong, nonatomic) NSDate *currentMonth FSCalendarDeprecated('currentPage'); +@property (assign, nonatomic) FSCalendarFlow flow FSCalendarDeprecated('scrollDirection'); +- (void)setSelectedDate:(NSDate *)selectedDate FSCalendarDeprecated(-selectDate:); +- (void)setSelectedDate:(NSDate *)selectedDate animate:(BOOL)animate FSCalendarDeprecated(-selectDate:scrollToDate:); +- (BOOL)date:(NSDate *)date sharesSameMonthWithDate:(NSDate *)anotherDate FSCalendarDeprecated(-isDate:equalToDate:toCalendarUnit); +- (BOOL)date:(NSDate *)date sharesSameWeekWithDate:(NSDate *)anotherDate FSCalendarDeprecated(-isDate:equalToDate:toCalendarUnit); +- (BOOL)date:(NSDate *)date sharesSameDayWithDate:(NSDate *)anotherDate FSCalendarDeprecated(-isDate:equalToDate:toCalendarUnit); +@end + +NS_ASSUME_NONNULL_END + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar.m new file mode 100644 index 0000000..a2b0828 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendar.m @@ -0,0 +1,2218 @@ +// +// FSCalendar.m +// FSCalendar +// +// Created by Wenchao Ding on 29/1/15. +// Copyright © 2016 Wenchao Ding. All rights reserved. +// + +#import "FSCalendar.h" +#import "FSCalendarHeader.h" +#import "FSCalendarStickyHeader.h" +#import "FSCalendarCell.h" +#import "FSCalendarFlowLayout.h" +#import "FSCalendarAnimator.h" + +#import "UIView+FSExtension.h" +#import "NSString+FSExtension.h" +#import "FSCalendarDynamicHeader.h" +#import "FSCalendarCollectionView.h" + +typedef NS_ENUM(NSUInteger, FSCalendarOrientation) { + FSCalendarOrientationLandscape, + FSCalendarOrientationPortrait +}; + +@interface FSCalendar (DataSourceAndDelegate) + +- (NSInteger)numberOfEventsForDate:(NSDate *)date; +- (NSString *)subtitleForDate:(NSDate *)date; +- (UIImage *)imageForDate:(NSDate *)date; +- (NSDate *)minimumDateForCalendar; +- (NSDate *)maximumDateForCalendar; + +- (UIColor *)preferredSelectionColorForDate:(NSDate *)date; +- (UIColor *)preferredTitleDefaultColorForDate:(NSDate *)date; +- (UIColor *)preferredTitleSelectionColorForDate:(NSDate *)date; +- (UIColor *)preferredSubtitleDefaultColorForDate:(NSDate *)date; +- (UIColor *)preferredSubtitleSelectionColorForDate:(NSDate *)date; +- (UIColor *)preferredBorderDefaultColorForDate:(NSDate *)date; +- (UIColor *)preferredBorderSelectionColorForDate:(NSDate *)date; +- (id)preferredEventColorForDate:(NSDate *)date; +- (FSCalendarCellShape)preferredCellShapeForDate:(NSDate *)date; + +- (BOOL)shouldSelectDate:(NSDate *)date; +- (void)didSelectDate:(NSDate *)date; +- (BOOL)shouldDeselectDate:(NSDate *)date; +- (void)didDeselectDate:(NSDate *)date; +- (void)currentPageDidChange; +- (BOOL)boundingRectWillChange:(BOOL)animated; + +@end + +@interface FSCalendar () +{ + NSMutableArray *_selectedDates; + NSDate *_minimumDate; + NSDate *_maximumDate; +} +@property (strong, nonatomic) NSMutableArray *weekdays; +@property (strong, nonatomic) NSMapTable *stickyHeaderMapTable; + +@property (strong, nonatomic) NSCalendar *calendar; +@property (strong, nonatomic) NSDateFormatter *formatter; +@property (strong, nonatomic) NSDateComponents *components; +@property (strong, nonatomic) NSTimeZone *timeZone; + +@property (weak , nonatomic) UIView *contentView; +@property (weak , nonatomic) UIView *daysContainer; +@property (weak , nonatomic) CAShapeLayer *maskLayer; +@property (weak , nonatomic) UIView *topBorder; +@property (weak , nonatomic) UIView *bottomBorder; +@property (weak , nonatomic) FSCalendarCollectionView *collectionView; +@property (weak , nonatomic) FSCalendarFlowLayout *collectionViewLayout; +@property (strong, nonatomic) FSCalendarAnimator *animator; + +@property (weak , nonatomic) FSCalendarHeader *header; +@property (weak , nonatomic) FSCalendarHeaderTouchDeliver *deliver; + +@property (assign, nonatomic) BOOL needsAdjustingMonthPosition; +@property (assign, nonatomic) BOOL needsAdjustingViewFrame; +@property (assign, nonatomic) BOOL needsAdjustingTextSize; +@property (assign, nonatomic) BOOL needsLayoutForWeekMode; +@property (assign, nonatomic) BOOL supressEvent; +@property (assign, nonatomic) CGFloat preferredHeaderHeight; +@property (assign, nonatomic) CGFloat preferredWeekdayHeight; +@property (assign, nonatomic) CGFloat preferredRowHeight; +@property (assign, nonatomic) FSCalendarOrientation orientation; + +@property (readonly, nonatomic) BOOL floatingMode; +@property (readonly, nonatomic) BOOL hasValidateVisibleLayout; +@property (readonly, nonatomic) NSArray *visibleStickyHeaders; +@property (readonly, nonatomic) FSCalendarOrientation currentCalendarOrientation; + +@property (readonly, nonatomic) id delegateAppearance; + +- (void)orientationDidChange:(NSNotification *)notification; + +- (NSDate *)dateForIndexPath:(NSIndexPath *)indexPath; +- (NSDate *)dateForIndexPath:(NSIndexPath *)indexPath scope:(FSCalendarScope)scope; +- (NSIndexPath *)indexPathForDate:(NSDate *)date; +- (NSIndexPath *)indexPathForDate:(NSDate *)date scope:(FSCalendarScope)scope; +- (CGSize)sizeThatFits:(CGSize)size scope:(FSCalendarScope)scope; + +- (NSInteger)numberOfHeadPlaceholdersForMonth:(NSDate *)month; + +- (void)scrollToDate:(NSDate *)date; +- (void)scrollToDate:(NSDate *)date animated:(BOOL)animated; +- (void)scrollToPageForDate:(NSDate *)date animated:(BOOL)animated; + +- (BOOL)isDateInRange:(NSDate *)date; +- (BOOL)isDateSelected:(NSDate *)date; +- (BOOL)isDateInDifferentPage:(NSDate *)date; + +- (void)selectDate:(NSDate *)date scrollToDate:(BOOL)scrollToDate forPlaceholder:(BOOL)forPlaceholder; +- (void)enqueueSelectedDate:(NSDate *)date; + +- (void)invalidateDateTools; +- (void)invalidateLayout; +- (void)invalidateWeekdaySymbols; +- (void)invalidateHeaders; +- (void)invalidateAppearanceForCell:(FSCalendarCell *)cell; + +- (void)invalidateWeekdayFont; +- (void)invalidateWeekdayTextColor; + +- (void)invalidateViewFrames; + +- (void)selectCounterpartDate:(NSDate *)date; +- (void)deselectCounterpartDate:(NSDate *)date; + +- (void)reloadDataForCell:(FSCalendarCell *)cell atIndexPath:(NSIndexPath *)indexPath; +- (void)reloadVisibleCells; + +@end + +@implementation FSCalendar + +@dynamic selectedDate; +@synthesize scrollDirection = _scrollDirection, firstWeekday = _firstWeekday, appearance = _appearance; + +#pragma mark - Life Cycle && Initialize + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self initialize]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + self = [super initWithCoder:aDecoder]; + if (self) { + [self initialize]; + } + return self; +} + +- (void)initialize +{ + _appearance = [[FSCalendarAppearance alloc] init]; + _appearance.calendar = self; + + _calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + _components = [[NSDateComponents alloc] init]; + _formatter = [[NSDateFormatter alloc] init]; + _locale = [NSLocale currentLocale]; + _timeZone = [NSTimeZone localTimeZone]; + _firstWeekday = 1; + [self invalidateDateTools]; + + _minimumDate = [self dateWithYear:1970 month:1 day:1]; + _maximumDate = [self dateWithYear:2099 month:12 day:31]; + + _headerHeight = FSCalendarAutomaticDimension; + _weekdayHeight = FSCalendarAutomaticDimension; + + _preferredHeaderHeight = FSCalendarAutomaticDimension; + _preferredWeekdayHeight = FSCalendarAutomaticDimension; + _preferredRowHeight = FSCalendarAutomaticDimension; + + _scrollDirection = FSCalendarScrollDirectionHorizontal; + _scope = FSCalendarScopeMonth; + _selectedDates = [NSMutableArray arrayWithCapacity:1]; + + _today = [self dateByIgnoringTimeComponentsOfDate:[NSDate date]]; + _currentPage = [self beginingOfMonthOfDate:_today]; + _pagingEnabled = YES; + _scrollEnabled = YES; + _needsAdjustingViewFrame = YES; + _needsAdjustingTextSize = YES; + _needsAdjustingMonthPosition = YES; + _stickyHeaderMapTable = [NSMapTable weakToWeakObjectsMapTable]; + _orientation = self.currentCalendarOrientation; + _focusOnSingleSelectedDate = YES; + _showsPlaceholders = YES; + + UIView *contentView = [[UIView alloc] initWithFrame:CGRectZero]; + contentView.backgroundColor = [UIColor clearColor]; + [self addSubview:contentView]; + self.contentView = contentView; + + CAShapeLayer *maskLayer = [CAShapeLayer layer]; + maskLayer.actions = @{@"path":[NSNull null]}; + contentView.layer.mask = maskLayer; + self.maskLayer = maskLayer; + + UIView *daysContainer = [[UIView alloc] initWithFrame:CGRectZero]; + daysContainer.backgroundColor = [UIColor clearColor]; + [contentView addSubview:daysContainer]; + self.daysContainer = daysContainer; + + FSCalendarFlowLayout *collectionViewLayout = [[FSCalendarFlowLayout alloc] init]; + collectionViewLayout.calendar = self; + + FSCalendarCollectionView *collectionView = [[FSCalendarCollectionView alloc] initWithFrame:CGRectZero + collectionViewLayout:collectionViewLayout]; + collectionView.dataSource = self; + collectionView.delegate = self; + collectionView.backgroundColor = [UIColor clearColor]; + collectionView.bounces = YES; + collectionView.pagingEnabled = YES; + collectionView.showsHorizontalScrollIndicator = NO; + collectionView.showsVerticalScrollIndicator = NO; + collectionView.delaysContentTouches = NO; + collectionView.canCancelContentTouches = YES; + collectionView.allowsMultipleSelection = NO; + [collectionView registerClass:[FSCalendarCell class] forCellWithReuseIdentifier:@"cell"]; + [collectionView registerClass:[FSCalendarStickyHeader class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"header"]; + [collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"placeholderHeader"]; + [daysContainer addSubview:collectionView]; + self.collectionView = collectionView; + self.collectionViewLayout = collectionViewLayout; + + UIView *view = [[UIView alloc] initWithFrame:CGRectZero]; + view.backgroundColor = [[UIColor lightGrayColor] colorWithAlphaComponent:0.25]; + [self addSubview:view]; + self.topBorder = view; + + view = [[UIView alloc] initWithFrame:CGRectZero]; + view.backgroundColor = _topBorder.backgroundColor; + [self addSubview:view]; + self.bottomBorder = view; + + [self invalidateLayout]; + + self.animator = [[FSCalendarAnimator alloc] init]; + self.animator.calendar = self; + self.animator.collectionView = self.collectionView; + self.animator.collectionViewLayout = self.collectionViewLayout; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationDidChange:) name:UIDeviceOrientationDidChangeNotification object:nil]; + +} + +- (void)dealloc +{ + _collectionView.delegate = nil; + _collectionView.dataSource = nil; + + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil]; +} + +#pragma mark - Overriden methods + +- (void)setBounds:(CGRect)bounds +{ + [super setBounds:bounds]; + if (!CGRectIsEmpty(bounds) && self.animator.state == FSCalendarTransitionStateIdle) { + [self invalidateViewFrames]; + } +} + +- (void)setFrame:(CGRect)frame +{ + [super setFrame:frame]; + if (!CGRectIsEmpty(frame) && self.animator.state == FSCalendarTransitionStateIdle) { + [self invalidateViewFrames]; + } +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + _supressEvent = YES; + + if (_needsAdjustingViewFrame) { + + BOOL needsAdjustingBoundingRect = self.scope == FSCalendarScopeMonth && !_showsPlaceholders && !self.hasValidateVisibleLayout; + + _contentView.frame = self.bounds; + + if (_needsLayoutForWeekMode) _scope = FSCalendarScopeMonth; + + CGFloat headerHeight = self.preferredHeaderHeight; + CGFloat weekdayHeight = self.preferredWeekdayHeight; + CGFloat rowHeight = self.preferredRowHeight; + CGFloat weekdayWidth = self.contentView.fs_width/_weekdays.count; + CGFloat padding = weekdayHeight*0.1; + if (self.scrollDirection == UICollectionViewScrollDirectionHorizontal) { + padding = FSCalendarFloor(padding); + rowHeight = FSCalendarFloor(rowHeight*2)*0.5; // Round to nearest multiple of 0.5. e.g. (16.8->16.5),(16.2->16.0) + } + + if (_needsLayoutForWeekMode) _scope = FSCalendarScopeWeek; + + _header.frame = CGRectMake(0, 0, self.fs_width, headerHeight); + [_weekdays enumerateObjectsUsingBlock:^(UILabel *weekdayLabel, NSUInteger index, BOOL *stop) { + weekdayLabel.frame = CGRectMake(index*weekdayWidth, + _header.fs_height, + weekdayWidth, + weekdayHeight); + }]; + + _deliver.frame = CGRectMake(_header.fs_left, _header.fs_top, _header.fs_width, headerHeight+weekdayHeight); + _deliver.hidden = _header.hidden; + if (!self.floatingMode) { + switch (_scope) { + case FSCalendarScopeMonth: { + CGFloat contentHeight = rowHeight*6 + padding*2; + _daysContainer.frame = CGRectMake(0, headerHeight+weekdayHeight, self.fs_width, contentHeight); + _collectionView.frame = _daysContainer.bounds; + if (needsAdjustingBoundingRect) { + self.animator.state = FSCalendarTransitionStateInProgress; + [self boundingRectWillChange:NO]; + self.animator.state = FSCalendarTransitionStateIdle; + } + break; + } + case FSCalendarScopeWeek: { + CGFloat contentHeight = rowHeight + padding*2; + _daysContainer.frame = CGRectMake(0, headerHeight+weekdayHeight, self.fs_width, contentHeight); + _collectionView.frame = _daysContainer.bounds; + break; + } + } + } else { + + CGFloat contentHeight = _contentView.fs_height; + _daysContainer.frame = CGRectMake(0, 0, self.fs_width, contentHeight); + _collectionView.frame = _daysContainer.bounds; + + } + _topBorder.frame = CGRectMake(0, -1, self.fs_width, 1); + _bottomBorder.frame = CGRectMake(0, self.fs_height, self.fs_width, 1); + + } + if (_needsAdjustingTextSize) { + _needsAdjustingTextSize = NO; + [_appearance adjustTitleIfNecessary]; + } + + if (_needsLayoutForWeekMode) { + _needsLayoutForWeekMode = NO; + _scope = FSCalendarScopeWeek; + [self.animator performScopeTransitionFromScope:FSCalendarScopeMonth toScope:FSCalendarScopeWeek animated:NO]; + } else { + if (_needsAdjustingMonthPosition) { + _needsAdjustingMonthPosition = NO; + _supressEvent = NO; + BOOL oldValue = [CATransaction disableActions]; + [CATransaction setDisableActions:YES]; + [self scrollToPageForDate:_pagingEnabled?_currentPage:(_currentPage?:self.selectedDate) animated:NO]; + [CATransaction setDisableActions:oldValue]; + } + } + + _supressEvent = NO; + +} + +- (void)layoutSublayersOfLayer:(CALayer *)layer +{ + [super layoutSublayersOfLayer:layer]; + if (layer == self.layer) { + if (_needsAdjustingViewFrame) { + _needsAdjustingViewFrame = NO; + + CGSize size = [self sizeThatFits:self.frame.size]; + _maskLayer.frame = self.bounds; + _maskLayer.path = [UIBezierPath bezierPathWithRect:(CGRect){CGPointZero,size}].CGPath; + + } + } +} + +#if TARGET_INTERFACE_BUILDER +- (void)prepareForInterfaceBuilder +{ + NSDate *date = [NSDate date]; + [self selectDate:[self dateWithYear:[self yearOfDate:date] month:[self monthOfDate:date] day:_appearance.fakedSelectedDay?:1]]; +} +#endif + +- (CGSize)sizeThatFits:(CGSize)size +{ + switch (self.animator.transition) { + case FSCalendarTransitionNone: + return [self sizeThatFits:size scope:_scope]; + case FSCalendarTransitionWeekToMonth: + if (self.animator.state == FSCalendarTransitionStateInProgress) { + return [self sizeThatFits:size scope:FSCalendarScopeMonth]; + } + case FSCalendarTransitionMonthToWeek: + break; + } + return [self sizeThatFits:size scope:FSCalendarScopeWeek]; +} + +- (CGSize)sizeThatFits:(CGSize)size scope:(FSCalendarScope)scope +{ + CGFloat headerHeight = self.preferredHeaderHeight; + CGFloat weekdayHeight = self.preferredWeekdayHeight; + CGFloat rowHeight = self.preferredRowHeight; + CGFloat paddings = weekdayHeight * 0.2; + + if (!self.floatingMode) { + switch (scope) { + case FSCalendarScopeMonth: { + CGFloat height = weekdayHeight + headerHeight + [self numberOfRowsInMonth:_currentPage]*rowHeight + paddings; + return CGSizeMake(size.width, height); + } + case FSCalendarScopeWeek: { + CGFloat height = weekdayHeight + headerHeight + rowHeight + paddings; + return CGSizeMake(size.width, height); + } + } + } else { + return CGSizeMake(size.width, self.fs_height); + } + return size; +} + +#pragma mark - + +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView +{ + if (self.animator.transition == FSCalendarTransitionWeekToMonth) { + return [self monthsFromDate:[self beginingOfMonthOfDate:_minimumDate] toDate:_maximumDate] + 1; + } + switch (_scope) { + case FSCalendarScopeMonth: + return [self monthsFromDate:[self beginingOfMonthOfDate:_minimumDate] toDate:_maximumDate] + 1; + case FSCalendarScopeWeek: + return [self weeksFromDate:[self beginingOfWeekOfDate:_minimumDate] toDate:_maximumDate] + 1; + } +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section +{ + if (self.animator.transition == FSCalendarTransitionWeekToMonth && self.animator.state == FSCalendarTransitionStateInProgress) { + return 42; + } + if (!self.floatingMode) { + switch (_scope) { + case FSCalendarScopeMonth: { + return 42; + } + case FSCalendarScopeWeek: { + return 7; + } + } + } else { + NSDate *currentPage = [self dateByAddingMonths:section toDate:[self beginingOfMonthOfDate:_minimumDate]]; + NSInteger numberOfRows = [self numberOfRowsInMonth:currentPage]; + return numberOfRows * 7; + } + return 7; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath +{ + FSCalendarCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath]; + [self reloadDataForCell:cell atIndexPath:indexPath]; + return cell; +} + +- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath +{ + if (self.floatingMode) { + if ([kind isEqualToString:UICollectionElementKindSectionHeader]) { + FSCalendarStickyHeader *stickyHeader = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"header" forIndexPath:indexPath]; + stickyHeader.calendar = self; + stickyHeader.month = [self dateByAddingMonths:indexPath.section toDate:[self beginingOfMonthOfDate:_minimumDate]]; + [stickyHeader setNeedsLayout]; + NSArray *allKeys = [_stickyHeaderMapTable.dictionaryRepresentation allKeysForObject:stickyHeader]; + if (allKeys.count) { + [allKeys enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) { + [_stickyHeaderMapTable removeObjectForKey:indexPath]; + }]; + } + [_stickyHeaderMapTable setObject:stickyHeader forKey:indexPath]; + return stickyHeader; + } + } + return [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"placeholderHeader" forIndexPath:indexPath]; +} + +#pragma mark - + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath +{ + FSCalendarCell *cell = (FSCalendarCell *)[collectionView cellForItemAtIndexPath:indexPath]; + cell.dateIsSelected = YES; + [cell performSelecting]; + NSDate *selectedDate = [self dateForIndexPath:indexPath]; + if (!_supressEvent) { + [self didSelectDate:selectedDate]; + } + [self selectCounterpartDate:selectedDate]; +} + +- (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath +{ + FSCalendarCell *cell = (FSCalendarCell *)[collectionView cellForItemAtIndexPath:indexPath]; + if (cell.dateIsPlaceholder) { + if (!_showsPlaceholders) return NO; + if ([self isDateInRange:cell.date]) { + [self selectDate:cell.date scrollToDate:YES forPlaceholder:YES]; + } else if (![self isDate:cell.date equalToDate:_currentPage toCalendarUnit:FSCalendarUnitMonth]){ + [self scrollToPageForDate:cell.date animated:YES]; + } + return NO; + } + NSDate *targetDate = [self dateForIndexPath:indexPath]; + if ([self isDateSelected:targetDate]) { + // 这个if几乎不会调用到 + if (self.allowsMultipleSelection) { + if ([self collectionView:collectionView shouldDeselectItemAtIndexPath:indexPath]) { + [collectionView deselectItemAtIndexPath:indexPath animated:YES]; + [self collectionView:collectionView didDeselectItemAtIndexPath:indexPath]; + } + } else { + // 点击了已经选择的日期,直接触发事件 + [self didSelectDate:self.selectedDate]; + } + return NO; + } + BOOL shouldSelect = YES; + if (cell.date && [self isDateInRange:cell.date] && !_supressEvent) { + shouldSelect &= [self shouldSelectDate:cell.date]; + } + if (shouldSelect) { + if (!self.allowsMultipleSelection && self.selectedDate) { + [self deselectDate:self.selectedDate]; + } + } + return shouldSelect && [self isDateInRange:cell.date]; +} + +- (void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath +{ + if (!self.allowsMultipleSelection && self.selectedDate) { + NSIndexPath *selectedIndexPath = [self indexPathForDate:self.selectedDate]; + if (![indexPath isEqual:selectedIndexPath]) { + [self collectionView:collectionView didDeselectItemAtIndexPath:selectedIndexPath]; + return; + } + } + FSCalendarCell *cell = (FSCalendarCell *)[collectionView cellForItemAtIndexPath:indexPath]; + if (cell) { + cell.dateIsSelected = NO; + [cell setNeedsLayout]; + } + NSDate *selectedDate = cell.date ?: [self dateForIndexPath:indexPath]; + [_selectedDates removeObject:selectedDate]; + [self deselectCounterpartDate:selectedDate]; + [self didDeselectDate:selectedDate]; +} + +- (BOOL)collectionView:(UICollectionView *)collectionView shouldDeselectItemAtIndexPath:(NSIndexPath *)indexPath +{ + if (!self.allowsMultipleSelection) { + NSIndexPath *selectedIndexPath = [self indexPathForDate:self.selectedDate]; + if (![indexPath isEqual:selectedIndexPath]) { + return [self collectionView:collectionView shouldDeselectItemAtIndexPath:selectedIndexPath]; + } + } + FSCalendarCell *cell = (FSCalendarCell *)[collectionView cellForItemAtIndexPath:indexPath]; + return [self shouldDeselectDate:(cell.date?:[self dateForIndexPath:indexPath])]; +} + +- (void)collectionView:(UICollectionView *)collectionView willDisplaySupplementaryView:(UICollectionReusableView *)view forElementKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath +{ + if ([elementKind isEqualToString:UICollectionElementKindSectionHeader] && [view isKindOfClass:[FSCalendarStickyHeader class]]) { + [view setNeedsLayout]; + } +} + +#pragma mark - + +- (void)scrollViewDidScroll:(UIScrollView *)scrollView +{ + if (_supressEvent) { + return; + } + if (self.floatingMode && _collectionView.indexPathsForVisibleItems.count) { + if (!self.window) return; + // Do nothing on bouncing + if (_collectionView.contentOffset.y < 0 || _collectionView.contentOffset.y > _collectionView.contentSize.height-_collectionView.fs_height) { + return; + } + NSDate *currentPage = _currentPage; + CGPoint significantPoint = CGPointMake(_collectionView.fs_width*0.5,MIN(self.preferredRowHeight*2.75, _collectionView.fs_height*0.5)+_collectionView.contentOffset.y); + NSIndexPath *significantIndexPath = [_collectionView indexPathForItemAtPoint:significantPoint]; + if (significantIndexPath) { + currentPage = [self dateByAddingMonths:significantIndexPath.section toDate:[self beginingOfMonthOfDate:_minimumDate]]; + } else { + __block FSCalendarStickyHeader *significantHeader = nil; + [_stickyHeaderMapTable.dictionaryRepresentation.allValues enumerateObjectsUsingBlock:^(FSCalendarStickyHeader *header, NSUInteger idx, BOOL *stop) { + if (CGRectContainsPoint(header.frame, significantPoint)) { + significantHeader = header; + *stop = YES; + } + }]; + if (significantHeader) { + currentPage = significantHeader.month; + } + } + + if (![self isDate:currentPage equalToDate:_currentPage toCalendarUnit:FSCalendarUnitMonth]) { + [self willChangeValueForKey:@"currentPage"]; + _currentPage = currentPage; + [self currentPageDidChange]; + [self didChangeValueForKey:@"currentPage"]; + } + + } else if (self.hasValidateVisibleLayout) { + CGFloat scrollOffset = 0; + switch (_collectionViewLayout.scrollDirection) { + case UICollectionViewScrollDirectionHorizontal: { + scrollOffset = scrollView.contentOffset.x/scrollView.fs_width; + break; + } + case UICollectionViewScrollDirectionVertical: { + scrollOffset = scrollView.contentOffset.y/scrollView.fs_height; + break; + } + } + _header.scrollOffset = scrollOffset; + } +} + +- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset +{ + if (!_pagingEnabled || !_scrollEnabled) { + return; + } + CGFloat pannedOffset = 0, targetOffset = 0, currentOffset = 0, contentSize = 0; + switch (_collectionViewLayout.scrollDirection) { + case UICollectionViewScrollDirectionHorizontal: { + pannedOffset = [scrollView.panGestureRecognizer translationInView:scrollView].x; + targetOffset = targetContentOffset->x; + currentOffset = scrollView.contentOffset.x; + contentSize = scrollView.fs_width; + break; + } + case UICollectionViewScrollDirectionVertical: { + pannedOffset = [scrollView.panGestureRecognizer translationInView:scrollView].y; + targetOffset = targetContentOffset->y; + currentOffset = scrollView.contentOffset.y; + contentSize = scrollView.fs_height; + break; + } + } + BOOL shouldTriggerPageChange = ((pannedOffset < 0 && targetOffset > currentOffset) || + (pannedOffset > 0 && targetOffset < currentOffset)) && _minimumDate; + if (shouldTriggerPageChange) { + NSDate *lastPage = _currentPage; + [self willChangeValueForKey:@"currentPage"]; + switch (_scope) { + case FSCalendarScopeMonth: { + NSDate *minimumPage = [self beginingOfMonthOfDate:_minimumDate]; + _currentPage = [self dateByAddingMonths:targetOffset/contentSize toDate:minimumPage]; + break; + } + case FSCalendarScopeWeek: { + NSDate *minimumPage = [self beginingOfWeekOfDate:_minimumDate]; + _currentPage = [self dateByAddingWeeks:targetOffset/contentSize toDate:minimumPage]; + break; + } + } + [self currentPageDidChange]; + if (!_showsPlaceholders && self.animator.state == FSCalendarTransitionStateIdle) { + [self.animator performBoudingRectTransitionFromMonth:lastPage toMonth:_currentPage duration:0.25]; + } + [self didChangeValueForKey:@"currentPage"]; + } +} + +#pragma mark - Notification + +- (void)orientationDidChange:(NSNotification *)notification +{ + self.orientation = self.currentCalendarOrientation; +} + +#pragma mark - Properties + +- (void)setAppearance:(FSCalendarAppearance *)appearance +{ + if (_appearance != appearance) { + _appearance = appearance; + } +} + +- (FSCalendarAppearance *)appearance +{ + return _appearance; +} + +- (void)setScrollDirection:(FSCalendarScrollDirection)scrollDirection +{ + if (_scrollDirection != scrollDirection) { + _scrollDirection = scrollDirection; + + if (self.floatingMode) return; + + switch (_scope) { + case FSCalendarScopeMonth: { + _supressEvent = YES; + + _collectionViewLayout.scrollDirection = (UICollectionViewScrollDirection)scrollDirection; + _header.scrollDirection = _collectionViewLayout.scrollDirection; + if (self.hasValidateVisibleLayout) { + [_collectionView reloadData]; + [_header reloadData]; + } + _needsAdjustingMonthPosition = YES; + [self setNeedsLayout]; + _supressEvent = NO; + break; + } + case FSCalendarScopeWeek: { + break; + } + } + } +} + +- (void)setScope:(FSCalendarScope)scope +{ + [self setScope:scope animated:NO]; +} + +- (void)setFirstWeekday:(NSUInteger)firstWeekday +{ + if (_firstWeekday != firstWeekday) { + _firstWeekday = firstWeekday; + [self invalidateDateTools]; + [self invalidateWeekdaySymbols]; + if (self.hasValidateVisibleLayout) { + [_collectionView reloadData]; + } + } +} + +- (void)setToday:(NSDate *)today +{ + if ([self daysFromDate:_minimumDate toDate:today] < 0) { + today = _minimumDate.copy; + } else if ([self daysFromDate:_maximumDate toDate:today] > 0) { + today = _maximumDate.copy; + } + if (![self isDateInToday:today]) { + _today = [self dateByIgnoringTimeComponentsOfDate:today]; + switch (_scope) { + case FSCalendarScopeMonth: { + _currentPage = [self beginingOfMonthOfDate:today]; + break; + } + case FSCalendarScopeWeek: { + _currentPage = [self beginingOfWeekOfDate:today]; + break; + } + } + _needsAdjustingMonthPosition = YES; + [self setNeedsLayout]; + + [_collectionView.visibleCells makeObjectsPerformSelector:@selector(setDateIsToday:) withObject:@NO]; + [[_collectionView cellForItemAtIndexPath:[self indexPathForDate:today]] setValue:@YES forKey:@"dateIsToday"]; + [_collectionView.visibleCells makeObjectsPerformSelector:@selector(setNeedsLayout)]; + + } +} + +- (void)setCurrentPage:(NSDate *)currentPage +{ + [self setCurrentPage:currentPage animated:NO]; +} + +- (void)setCurrentPage:(NSDate *)currentPage animated:(BOOL)animated +{ + if ([self daysFromDate:_minimumDate toDate:currentPage] < 0) { + currentPage = _minimumDate.copy; + } else if ([self daysFromDate:_maximumDate toDate:currentPage] > 0) { + currentPage = _maximumDate.copy; + } + if (self.floatingMode || [self isDateInDifferentPage:currentPage]) { + currentPage = [self dateByIgnoringTimeComponentsOfDate:currentPage]; + [self scrollToPageForDate:currentPage animated:animated]; + } +} + +- (void)setHeaderHeight:(CGFloat)headerHeight +{ + if (_headerHeight != headerHeight) { + _headerHeight = headerHeight; + _needsAdjustingViewFrame = YES; + [self setNeedsLayout]; + } +} + +- (void)setWeekdayHeight:(CGFloat)weekdayHeight +{ + if (_weekdayHeight != weekdayHeight) { + _weekdayHeight = weekdayHeight; + _needsAdjustingViewFrame = YES; + [self setNeedsLayout]; + } +} + +- (void)setDataSource:(id)dataSource +{ + if (![_dataSource isEqual:dataSource]) { + _dataSource = dataSource; + _minimumDate = self.minimumDateForCalendar; + _maximumDate = self.maximumDateForCalendar; + } +} + +- (void)setLocale:(NSLocale *)locale +{ + if (![_locale isEqual:locale]) { + _locale = locale; + [self invalidateDateTools]; + [self invalidateWeekdaySymbols]; + if (self.hasValidateVisibleLayout) { + [self invalidateHeaders]; + } + } +} + +- (void)setIdentifier:(NSString *)identifier +{ + if (![identifier isEqualToString:_calendar.calendarIdentifier]) { + self.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:identifier]; + [self invalidateDateTools]; + [self invalidateWeekdaySymbols]; + if (self.hasValidateVisibleLayout) { + [self reloadData]; + } + _minimumDate = [self dateByIgnoringTimeComponentsOfDate:_minimumDate]; + _currentPage = [self dateByIgnoringTimeComponentsOfDate:_currentPage]; + BOOL suppress = _supressEvent; + _supressEvent = YES; + [self scrollToPageForDate:_today animated:NO]; + _supressEvent = suppress; + } +} + +- (NSString *)identifier +{ + return _calendar.calendarIdentifier; +} + +- (void)setAllowsMultipleSelection:(BOOL)allowsMultipleSelection +{ + _collectionView.allowsMultipleSelection = allowsMultipleSelection; +} + +- (BOOL)allowsMultipleSelection +{ + return _collectionView.allowsMultipleSelection; +} + +- (void)setAllowsSelection:(BOOL)allowsSelection +{ + _collectionView.allowsSelection = allowsSelection; +} + +- (BOOL)allowsSelection +{ + return _collectionView.allowsSelection; +} + +- (void)setPagingEnabled:(BOOL)pagingEnabled +{ + if (_pagingEnabled != pagingEnabled) { + _pagingEnabled = pagingEnabled; + + [self invalidateLayout]; + } +} + +- (void)setScrollEnabled:(BOOL)scrollEnabled +{ + if (_scrollEnabled != scrollEnabled) { + _scrollEnabled = scrollEnabled; + + _collectionView.scrollEnabled = scrollEnabled; + _header.scrollEnabled = scrollEnabled; + + [self invalidateLayout]; + } +} + +- (void)setOrientation:(FSCalendarOrientation)orientation +{ + if (_orientation != orientation) { + _orientation = orientation; + + _needsAdjustingViewFrame = YES; + _needsAdjustingMonthPosition = YES; + _needsAdjustingTextSize = YES; + _preferredWeekdayHeight = FSCalendarAutomaticDimension; + _preferredRowHeight = FSCalendarAutomaticDimension; + _preferredHeaderHeight = FSCalendarAutomaticDimension; + [self.visibleStickyHeaders setValue:@YES forKey:@"needsAdjustingViewFrame"]; + [_collectionView.visibleCells setValue:@YES forKey:@"needsAdjustingViewFrame"]; + [self.visibleStickyHeaders makeObjectsPerformSelector:@selector(setNeedsLayout)]; + [_collectionView.visibleCells makeObjectsPerformSelector:@selector(setNeedsLayout)]; + _header.needsAdjustingViewFrame = YES; + [_collectionViewLayout invalidateLayout]; + [self setNeedsLayout]; + } +} + +- (NSDate *)selectedDate +{ + return _selectedDates.lastObject; +} + +- (NSArray *)selectedDates +{ + return [NSArray arrayWithArray:_selectedDates]; +} + +- (CGFloat)preferredHeaderHeight +{ + if (_headerHeight == FSCalendarAutomaticDimension) { + if (_preferredWeekdayHeight == FSCalendarAutomaticDimension) { + if (!self.floatingMode) { + CGFloat divider = _scope == FSCalendarScopeMonth ? FSCalendarStandardMonthlyPageHeight : FSCalendarStandardWeeklyPageHeight; + _preferredHeaderHeight = (FSCalendarStandardHeaderHeight/divider)*self.fs_height; + _preferredHeaderHeight -= (_preferredHeaderHeight-FSCalendarStandardHeaderHeight)*0.5; + } else { + _preferredHeaderHeight = FSCalendarStandardHeaderHeight*MAX(1, FSCalendarDeviceIsIPad*1.5); + } + } + return _preferredHeaderHeight; + } + return _headerHeight; +} + +- (CGFloat)preferredWeekdayHeight +{ + if (_weekdayHeight == FSCalendarAutomaticDimension) { + if (_preferredWeekdayHeight == FSCalendarAutomaticDimension) { + if (!self.floatingMode) { + CGFloat divider = _scope == FSCalendarScopeMonth ? FSCalendarStandardMonthlyPageHeight : FSCalendarStandardWeeklyPageHeight; + _preferredWeekdayHeight = (FSCalendarStandardWeekdayHeight/divider)*self.fs_height; + } else { + _preferredWeekdayHeight = FSCalendarStandardWeekdayHeight*MAX(1, FSCalendarDeviceIsIPad*1.5); + } + } + return _preferredWeekdayHeight; + } + return _weekdayHeight; +} + +- (CGFloat)preferredRowHeight +{ + if (_preferredRowHeight == FSCalendarAutomaticDimension) { + CGFloat headerHeight = self.preferredHeaderHeight; + CGFloat weekdayHeight = self.preferredWeekdayHeight; + CGFloat contentHeight = self.fs_height-headerHeight-weekdayHeight; + CGFloat padding = weekdayHeight*0.1; + if (self.collectionViewLayout.scrollDirection == UICollectionViewScrollDirectionHorizontal) { + padding = FSCalendarFloor(padding); + } + if (!self.floatingMode) { + switch (_scope) { + case FSCalendarScopeMonth: { + _preferredRowHeight = _showsPlaceholders ? (contentHeight-padding*2)/6.0 : FSCalendarStandardRowHeight; + break; + } + case FSCalendarScopeWeek: { + _preferredRowHeight = _showsPlaceholders ? contentHeight-padding*2 : FSCalendarStandardRowHeight; + break; + } + } + } else { + _preferredRowHeight = FSCalendarStandardRowHeight*MAX(1, FSCalendarDeviceIsIPad*1.5); + } + } + return _preferredRowHeight; +} + +- (id)delegateAppearance +{ + if (_delegate && [_delegate conformsToProtocol:@protocol(FSCalendarDelegateAppearance)]) { + return (id)_delegate; + } + return nil; +} + +- (BOOL)floatingMode +{ + return _scrollEnabled && !_pagingEnabled; +} + +#pragma mark - Public + +- (void)reloadData +{ + NSDate *minimumDate = self.minimumDateForCalendar; + NSDate *maximumDate = self.maximumDateForCalendar; + if (![self isDate:minimumDate equalToDate:_minimumDate toCalendarUnit:FSCalendarUnitMonth] || ![self isDate:maximumDate equalToDate:_maximumDate toCalendarUnit:FSCalendarUnitMonth]) { + _minimumDate = minimumDate; + _maximumDate = maximumDate; + [_collectionView reloadData]; + [_header.collectionView reloadData]; + [self setNeedsLayout]; + + } else { + [self reloadVisibleCells]; + } + + [self invalidateWeekdayFont]; + [self invalidateWeekdayTextColor]; + [self invalidateWeekdaySymbols]; + [self invalidateHeaders]; +} + +- (void)setScope:(FSCalendarScope)scope animated:(BOOL)animated +{ + if (_scope != scope) { + +#define m_set_scope \ + [self willChangeValueForKey:@"scope"]; \ + _scope = scope; \ + [self didChangeValueForKey:@"scope"]; \ + + if (self.floatingMode) { + m_set_scope + return; + } + + FSCalendarScope prevScope = _scope; + + if (!self.hasValidateVisibleLayout && prevScope == FSCalendarScopeMonth && scope == FSCalendarScopeWeek) { + m_set_scope + _needsLayoutForWeekMode = YES; + [self setNeedsLayout]; + return; + } + + if (self.animator.state == FSCalendarTransitionStateIdle) { + m_set_scope + [self.animator performScopeTransitionFromScope:prevScope toScope:scope animated:animated]; + } + + } +} + +- (void)setShowsPlaceholders:(BOOL)showsPlaceholders +{ + if (_showsPlaceholders != showsPlaceholders) { + _showsPlaceholders = showsPlaceholders; + if (self.hasValidateVisibleLayout) { + _preferredRowHeight = FSCalendarAutomaticDimension; + [_collectionView reloadData]; + } + } +} + +- (void)selectDate:(NSDate *)date +{ + [self selectDate:date scrollToDate:YES]; +} + +- (void)selectDate:(NSDate *)date scrollToDate:(BOOL)scrollToDate +{ + [self selectDate:date scrollToDate:scrollToDate forPlaceholder:NO]; +} + +- (void)deselectDate:(NSDate *)date +{ + date = [self dateByIgnoringTimeComponentsOfDate:date]; + if (![_selectedDates containsObject:date]) { + return; + } + [_selectedDates removeObject:date]; + NSIndexPath *indexPath = [self indexPathForDate:date]; + if ([_collectionView.indexPathsForSelectedItems containsObject:indexPath]) { + [_collectionView deselectItemAtIndexPath:indexPath animated:YES]; + FSCalendarCell *cell = (FSCalendarCell *)[_collectionView cellForItemAtIndexPath:indexPath]; + cell.dateIsSelected = NO; + [cell setNeedsLayout]; + [self deselectCounterpartDate:date]; + } +} + +- (void)selectDate:(NSDate *)date scrollToDate:(BOOL)scrollToDate forPlaceholder:(BOOL)forPlaceholder +{ + if (!self.allowsSelection) { + return; + } + if ([self daysFromDate:_minimumDate toDate:date] < 0) { + date = _minimumDate.copy; + } else if ([self daysFromDate:_maximumDate toDate:date] > 0) { + date = _maximumDate.copy; + } + NSDate *targetDate = [self dateByIgnoringTimeComponentsOfDate:date]; + NSIndexPath *targetIndexPath = [self indexPathForDate:targetDate]; + + BOOL shouldSelect = !_supressEvent; + // 跨月份点击 + if (forPlaceholder) { + if (self.allowsMultipleSelection) { + // 处理多选模式 + if ([self isDateSelected:targetDate]) { + // 已经选中的日期,是否应该反选,如果不应该,则不切换月份,不选中 + BOOL shouldDeselect = [self shouldDeselectDate:targetDate]; + if (!shouldDeselect) { + return; + } + } else { + // 未选中的日期,判断是否应该选中,不应该选中则不切换月份,不选中 + shouldSelect &= [self shouldSelectDate:targetDate]; + if (!shouldSelect) { + return; + } + [_collectionView selectItemAtIndexPath:targetIndexPath animated:YES scrollPosition:UICollectionViewScrollPositionNone]; + [self collectionView:_collectionView didSelectItemAtIndexPath:targetIndexPath]; + } + } else { + // 处理单选模式 + shouldSelect &= [self shouldSelectDate:targetDate]; + if (shouldSelect) { + if ([self isDateSelected:targetDate]) { + [self didSelectDate:targetDate]; + } else { + NSDate *selectedDate = self.selectedDate; + if (selectedDate) { + [self deselectDate:selectedDate]; + } + [_collectionView selectItemAtIndexPath:targetIndexPath animated:YES scrollPosition:UICollectionViewScrollPositionNone]; + [self collectionView:_collectionView didSelectItemAtIndexPath:targetIndexPath]; + } + } else { + return; + } + } + + } else if (![self isDateSelected:targetDate]){ + // 调用代码选中未选中日期 + if (self.selectedDate && !self.allowsMultipleSelection) { + [self deselectDate:self.selectedDate]; + } + [_collectionView selectItemAtIndexPath:targetIndexPath animated:YES scrollPosition:UICollectionViewScrollPositionNone]; + FSCalendarCell *cell = (FSCalendarCell *)[_collectionView cellForItemAtIndexPath:targetIndexPath]; + [cell performSelecting]; + [self enqueueSelectedDate:targetDate]; + [self selectCounterpartDate:targetDate]; + + } else if (![_collectionView.indexPathsForSelectedItems containsObject:targetIndexPath]) { + // 调用代码选中已选中日期 + [_collectionView selectItemAtIndexPath:targetIndexPath animated:NO scrollPosition:UICollectionViewScrollPositionNone]; + } + + if (scrollToDate) { + // 如果跨月份点击日期,并且该日期不应该选中,则不跳转页面,其他情况均跳转 + if (forPlaceholder && !shouldSelect) { + return; + } + [self scrollToPageForDate:targetDate animated:YES]; + } +} + +#pragma mark - Private methods + +- (void)scrollToDate:(NSDate *)date +{ + [self scrollToDate:date animated:NO]; +} + +- (void)scrollToDate:(NSDate *)date animated:(BOOL)animated +{ + if (!_minimumDate || !_maximumDate) { + return; + } + animated &= _scrollEnabled; // No animation if _scrollEnabled == NO; + + _supressEvent = !animated; + NSDate * targetDate = [self daysFromDate:_minimumDate toDate:date] < 0 ? _minimumDate : date; + targetDate = [self daysFromDate:_maximumDate toDate:targetDate] > 0 ? _maximumDate : targetDate; + NSInteger scrollOffset = 0; + switch (_scope) { + case FSCalendarScopeMonth: { + scrollOffset = [self monthsFromDate:[self beginingOfMonthOfDate:_minimumDate] toDate:targetDate]; + break; + } + case FSCalendarScopeWeek: { + scrollOffset = [self weeksFromDate:[self beginingOfWeekOfDate:_minimumDate] toDate:targetDate]; + break; + } + } + + if (!self.floatingMode) { + + switch (_collectionViewLayout.scrollDirection) { + case UICollectionViewScrollDirectionVertical: { + [_collectionView setContentOffset:CGPointMake(0, scrollOffset * _collectionView.fs_height) animated:animated]; + break; + } + case UICollectionViewScrollDirectionHorizontal: { + [_collectionView setContentOffset:CGPointMake(scrollOffset * _collectionView.fs_width, 0) animated:animated]; + break; + } + } + + } else { + // 全屏模式中,切换页面时需要将该月份提升到视图最上方 + if (self.hasValidateVisibleLayout) { + // Force layout to avoid crash on orientation changing + [_collectionViewLayout layoutAttributesForElementsInRect:_collectionView.bounds]; + CGRect headerFrame = [_collectionViewLayout layoutAttributesForSupplementaryViewOfKind:UICollectionElementKindSectionHeader atIndexPath:[NSIndexPath indexPathForItem:0 inSection:scrollOffset]].frame; + CGPoint targetOffset = CGPointMake(0, MIN(headerFrame.origin.y,MAX(0,_collectionView.contentSize.height-_collectionView.fs_bottom))); + [_collectionView setContentOffset:targetOffset animated:animated]; + + } else { + // 如果在loadView或者viewDidLoad中调用需要切换月份的方法, 这时UICollectionView并没有准备好自己的单元格和空间大小,这时不能直接调用setContentOffset,而是等到在layoutSubviews之后再去调用 + _currentPage = targetDate; + _needsAdjustingMonthPosition = YES; + [self setNeedsLayout]; + } + + } + + if (_header && !animated) { + _header.scrollOffset = scrollOffset; + } + _supressEvent = NO; +} + +- (void)scrollToPageForDate:(NSDate *)date animated:(BOOL)animated +{ + if (!_collectionView.tracking) { + if (!self.floatingMode) { + if ([self isDateInDifferentPage:date] && [self isDateInRange:date]) { + [self willChangeValueForKey:@"currentPage"]; + NSDate *lastPage = _currentPage; + switch (_scope) { + case FSCalendarScopeMonth: { + _currentPage = [self beginingOfMonthOfDate:date]; + break; + } + case FSCalendarScopeWeek: { + _currentPage = [self beginingOfWeekOfDate:date]; + break; + } + } + if (!_supressEvent && self.hasValidateVisibleLayout) { + _supressEvent = YES; + [self currentPageDidChange]; + if (!_showsPlaceholders && self.animator.state == FSCalendarTransitionStateIdle) { + [self.animator performBoudingRectTransitionFromMonth:lastPage toMonth:_currentPage duration:0.33]; + } + _supressEvent = NO; + } + [self didChangeValueForKey:@"currentPage"]; + } + [self scrollToDate:_currentPage animated:animated]; + } else { + [self scrollToDate:[self beginingOfMonthOfDate:date] animated:animated]; + } + } +} + +- (NSDate *)dateForIndexPath:(NSIndexPath *)indexPath scope:(FSCalendarScope)scope +{ + switch (scope) { + case FSCalendarScopeMonth: { + NSDate *currentPage = [self dateByAddingMonths:indexPath.section toDate:[self beginingOfMonthOfDate:_minimumDate]]; + NSInteger numberOfHeadPlaceholders = [self numberOfHeadPlaceholdersForMonth:currentPage]; + NSDate *firstDateOfPage = [self dateBySubstractingDays:numberOfHeadPlaceholders fromDate:currentPage]; + switch (_collectionViewLayout.scrollDirection) { + case UICollectionViewScrollDirectionHorizontal: { + NSUInteger rows = indexPath.item % 6; + NSUInteger columns = indexPath.item / 6; + NSUInteger daysOffset = 7*rows + columns; + return [self dateByAddingDays:daysOffset toDate:firstDateOfPage]; + } + case UICollectionViewScrollDirectionVertical: { + NSUInteger daysOffset = indexPath.item; + return [self dateByAddingDays:daysOffset toDate:firstDateOfPage]; + } + } + break; + } + case FSCalendarScopeWeek: { + NSDate *currentPage = [self dateByAddingWeeks:indexPath.section toDate:[self beginingOfWeekOfDate:_minimumDate]]; + return [self dateByAddingDays:indexPath.item toDate:currentPage]; + } + } + return nil; +} + +- (NSDate *)dateForIndexPath:(NSIndexPath *)indexPath +{ + if (self.animator.transition == FSCalendarTransitionWeekToMonth && self.animator.state == FSCalendarTransitionStateInProgress) { + return [self dateForIndexPath:indexPath scope:FSCalendarScopeMonth]; + } + return [self dateForIndexPath:indexPath scope:_scope]; +} + +- (NSIndexPath *)indexPathForDate:(NSDate *)date scope:(FSCalendarScope)scope +{ + NSInteger item = 0; + NSInteger section = 0; + switch (scope) { + case FSCalendarScopeMonth: { + section = [self monthsFromDate:[self beginingOfMonthOfDate:_minimumDate] toDate:date]; + NSDate *firstDayOfMonth = [self beginingOfMonthOfDate:date]; + NSInteger numberOfHeadPlaceholders = [self numberOfHeadPlaceholdersForMonth:firstDayOfMonth]; + NSDate *firstDateOfPage = [self dateBySubstractingDays:numberOfHeadPlaceholders fromDate:firstDayOfMonth]; + switch (_collectionViewLayout.scrollDirection) { + case UICollectionViewScrollDirectionHorizontal: { + NSInteger vItem = [self daysFromDate:firstDateOfPage toDate:date]; + NSInteger rows = vItem/7; + NSInteger columns = vItem%7; + item = columns*6 + rows; + break; + } + case UICollectionViewScrollDirectionVertical: { + item = [self daysFromDate:firstDateOfPage toDate:date]; + break; + } + } + break; + } + case FSCalendarScopeWeek: { + section = [self weeksFromDate:[self beginingOfWeekOfDate:_minimumDate] toDate:date]; + item = (([self weekdayOfDate:date] - _firstWeekday) + 7) % 7; + break; + } + } + return [NSIndexPath indexPathForItem:item inSection:section]; +} + +- (NSIndexPath *)indexPathForDate:(NSDate *)date +{ + return [self indexPathForDate:date scope:_scope]; +} + +- (BOOL)isDateInRange:(NSDate *)date +{ + BOOL flag = [self daysFromDate:_minimumDate toDate:date] >= 0; + flag &= [self daysFromDate:_maximumDate toDate:date] <= 0; + return flag; +} + +- (BOOL)isDateSelected:(NSDate *)date +{ + return [_selectedDates containsObject:date] || [_collectionView.indexPathsForSelectedItems containsObject:[self indexPathForDate:date]]; +} + +- (BOOL)isDateInDifferentPage:(NSDate *)date +{ + if (self.floatingMode) { + return ![self isDate:date equalToDate:_currentPage toCalendarUnit:FSCalendarUnitMonth]; + } + switch (_scope) { + case FSCalendarScopeMonth: + return ![self isDate:date equalToDate:_currentPage toCalendarUnit:FSCalendarUnitMonth]; + case FSCalendarScopeWeek: + return ![self isDate:date equalToDate:_currentPage toCalendarUnit:FSCalendarUnitWeekOfYear]; + } +} + +- (BOOL)hasValidateVisibleLayout +{ + return self.superview && !CGSizeEqualToSize(_collectionView.frame.size, CGSizeZero) && !CGSizeEqualToSize(_collectionView.contentSize, CGSizeZero); +} + +- (void)invalidateDateTools +{ + _calendar.locale = _locale; + _calendar.timeZone = _timeZone; + _calendar.firstWeekday = _firstWeekday; + _components.calendar = _calendar; + _components.timeZone = _timeZone; + _formatter.calendar = _calendar; + _formatter.timeZone = _timeZone; + _formatter.locale = _locale; +} + +- (void)invalidateLayout +{ + if (!self.floatingMode) { + + if (!_header) { + + FSCalendarHeader *header = [[FSCalendarHeader alloc] initWithFrame:CGRectZero]; + header.calendar = self; + header.scrollEnabled = _scrollEnabled; + [_contentView addSubview:header]; + self.header = header; + + } + + if (_scrollEnabled) { + if (!_deliver) { + FSCalendarHeaderTouchDeliver *deliver = [[FSCalendarHeaderTouchDeliver alloc] initWithFrame:CGRectZero]; + deliver.header = _header; + deliver.calendar = self; + [_contentView addSubview:deliver]; + self.deliver = deliver; + } + } else if (_deliver) { + [_deliver removeFromSuperview]; + } + + if (!_weekdays.count) { + NSArray *weekSymbols = self.calendar.shortStandaloneWeekdaySymbols; + _weekdays = [NSMutableArray arrayWithCapacity:weekSymbols.count]; + UIFont *weekdayFont = _appearance.preferredWeekdayFont; + for (int i = 0; i < weekSymbols.count; i++) { + UILabel *weekdayLabel = [[UILabel alloc] initWithFrame:CGRectZero]; + weekdayLabel.text = weekSymbols[i]; + weekdayLabel.textAlignment = NSTextAlignmentCenter; + weekdayLabel.font = weekdayFont; + weekdayLabel.textColor = _appearance.weekdayTextColor; + [_weekdays addObject:weekdayLabel]; + [_contentView addSubview:weekdayLabel]; + } + } + + _collectionView.pagingEnabled = YES; + _collectionViewLayout.scrollDirection = (UICollectionViewScrollDirection)self.scrollDirection; + + } else { + + if (_header) { + [_header removeFromSuperview]; + } + if (_weekdays.count) { + [_weekdays makeObjectsPerformSelector:@selector(removeFromSuperview)]; + [_weekdays removeAllObjects]; + } + + _collectionView.pagingEnabled = NO; + _collectionViewLayout.scrollDirection = UICollectionViewScrollDirectionVertical; + + [self deselectCounterpartDate:nil]; + } + + _preferredHeaderHeight = FSCalendarAutomaticDimension; + _preferredWeekdayHeight = FSCalendarAutomaticDimension; + _preferredRowHeight = FSCalendarAutomaticDimension; + _needsAdjustingViewFrame = YES; + [self setNeedsLayout]; +} + +- (void)invalidateWeekdaySymbols +{ + BOOL useVeryShortWeekdaySymbols = (_appearance.caseOptions & (15<<4) ) == FSCalendarCaseOptionsWeekdayUsesSingleUpperCase; + NSArray *weekdaySymbols = useVeryShortWeekdaySymbols ? _calendar.veryShortStandaloneWeekdaySymbols : _calendar.shortStandaloneWeekdaySymbols; + BOOL useDefaultWeekdayCase = (_appearance.caseOptions & (15<<4) ) == FSCalendarCaseOptionsWeekdayUsesDefaultCase; + [_weekdays enumerateObjectsUsingBlock:^(UILabel *label, NSUInteger index, BOOL *stop) { + index += _firstWeekday-1; + index %= 7; + label.text = useDefaultWeekdayCase ? weekdaySymbols[index] : [weekdaySymbols[index] uppercaseString]; + }]; + if (self.visibleStickyHeaders.count) { + [self.visibleStickyHeaders makeObjectsPerformSelector:_cmd]; + } +} + +- (void)invalidateHeaders +{ + [_header.collectionView reloadData]; + if (_stickyHeaderMapTable.count) { + [_stickyHeaderMapTable.objectEnumerator.allObjects makeObjectsPerformSelector:@selector(reloadData)]; + } +} + +- (void)invalidateAppearanceForCell:(FSCalendarCell *)cell +{ + cell.preferredSelectionColor = [self preferredSelectionColorForDate:cell.date]; + cell.preferredTitleDefaultColor = [self preferredTitleDefaultColorForDate:cell.date]; + cell.preferredTitleSelectionColor = [self preferredTitleSelectionColorForDate:cell.date]; + if (cell.subtitle) { + cell.preferredSubtitleDefaultColor = [self preferredSubtitleDefaultColorForDate:cell.date]; + cell.preferredSubtitleSelectionColor = [self preferredSubtitleSelectionColorForDate:cell.date]; + } + if (cell.numberOfEvents) cell.preferredEventColor = [self preferredEventColorForDate:cell.date]; + cell.preferredBorderDefaultColor = [self preferredBorderDefaultColorForDate:cell.date]; + cell.preferredBorderSelectionColor = [self preferredBorderSelectionColorForDate:cell.date]; + cell.preferredCellShape = [self preferredCellShapeForDate:cell.date]; + + [cell setNeedsLayout]; +} + +- (void)reloadDataForCell:(FSCalendarCell *)cell atIndexPath:(NSIndexPath *)indexPath +{ + cell.calendar = self; + cell.date = [self dateForIndexPath:indexPath]; + cell.image = [self imageForDate:cell.date]; + cell.numberOfEvents = [self numberOfEventsForDate:cell.date]; + cell.subtitle = [self subtitleForDate:cell.date]; + cell.dateIsSelected = [_selectedDates containsObject:cell.date]; + cell.dateIsToday = [self isDateInToday:cell.date]; + switch (_scope) { + case FSCalendarScopeMonth: { + NSDate *firstPage = [self beginingOfMonthOfDate:_minimumDate]; + NSDate *month = [self dateByAddingMonths:indexPath.section toDate:firstPage]; + cell.dateIsPlaceholder = ![self isDate:cell.date equalToDate:month toCalendarUnit:FSCalendarUnitMonth] || ![self isDateInRange:cell.date]; + if (cell.dateIsPlaceholder) { + cell.dateIsSelected &= _pagingEnabled; + cell.dateIsToday &= _pagingEnabled; + } + break; + } + case FSCalendarScopeWeek: { + if (_pagingEnabled) { + cell.dateIsPlaceholder = ![self isDateInRange:cell.date]; + } + break; + } + } + [self invalidateAppearanceForCell:cell]; + if (cell.dateIsSelected) { + if (cell.dateIsPlaceholder) indexPath = [self indexPathForDate:cell.date]; + [_collectionView selectItemAtIndexPath:indexPath animated:NO scrollPosition:UICollectionViewScrollPositionNone]; + } else if ([_collectionView.indexPathsForSelectedItems containsObject:indexPath]) { + [_collectionView deselectItemAtIndexPath:indexPath animated:NO]; + } + [cell setNeedsLayout]; +} + +- (void)reloadVisibleCells +{ + [_collectionView.indexPathsForVisibleItems enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) { + FSCalendarCell *cell = (FSCalendarCell *)[_collectionView cellForItemAtIndexPath:indexPath]; + [self reloadDataForCell:cell atIndexPath:indexPath]; + }]; +} + +- (void)selectCounterpartDate:(NSDate *)date +{ + if (!self.floatingMode) { + [_collectionView.visibleCells enumerateObjectsUsingBlock:^(FSCalendarCell *cell, NSUInteger idx, BOOL *stop) { + if (cell.dateIsPlaceholder && [self isDate:cell.date equalToDate:date toCalendarUnit:FSCalendarUnitDay] && !cell.dateIsSelected) { + cell.dateIsSelected = YES; + [cell setNeedsLayout]; + *stop = YES; + } + }]; + } +} + +- (void)deselectCounterpartDate:(NSDate *)date +{ + if (self.floatingMode) { + [_collectionView.visibleCells enumerateObjectsUsingBlock:^(FSCalendarCell *cell, NSUInteger index, BOOL *stop) { + if (cell.dateIsPlaceholder && cell.dateIsSelected) { + cell.dateIsSelected = NO; + [_collectionView deselectItemAtIndexPath:[_collectionView indexPathForCell:cell] animated:NO]; + [cell setNeedsLayout]; + } + }]; + } else { + [_collectionView.visibleCells enumerateObjectsUsingBlock:^(FSCalendarCell *cell, NSUInteger idx, BOOL *stop) { + if (cell.dateIsPlaceholder && [self isDate:cell.date equalToDate:date toCalendarUnit:FSCalendarUnitDay] && cell.dateIsSelected) { + cell.dateIsSelected = NO; + [_collectionView deselectItemAtIndexPath:[_collectionView indexPathForCell:cell] animated:NO]; + [cell setNeedsLayout]; + *stop = YES; + } + }]; + } +} + +- (void)enqueueSelectedDate:(NSDate *)date +{ + if (!self.allowsMultipleSelection) { + [_selectedDates removeAllObjects]; + } + if (![_selectedDates containsObject:date]) { + [_selectedDates addObject:date]; + } +} + +- (NSArray *)visibleStickyHeaders +{ + return _stickyHeaderMapTable.objectEnumerator.allObjects; +} + + +- (void)invalidateWeekdayFont +{ + [_weekdays makeObjectsPerformSelector:@selector(setFont:) withObject:_appearance.preferredWeekdayFont]; +} + +- (void)invalidateWeekdayTextColor +{ + [_weekdays makeObjectsPerformSelector:@selector(setTextColor:) withObject:_appearance.weekdayTextColor]; +} + +- (void)invalidateViewFrames +{ + _needsAdjustingViewFrame = YES; + _needsAdjustingTextSize = YES; + _needsAdjustingMonthPosition = YES; + + _preferredHeaderHeight = FSCalendarAutomaticDimension; + _preferredWeekdayHeight = FSCalendarAutomaticDimension; + _preferredRowHeight = FSCalendarAutomaticDimension; + + [self.visibleStickyHeaders setValue:@YES forKey:@"needsAdjustingViewFrame"]; + [self.collectionView.visibleCells setValue:@YES forKey:@"needsAdjustingViewFrame"]; + self.header.needsAdjustingViewFrame = YES; + [self.appearance invalidateFonts]; +} + +// The best way to detect orientation +// http://stackoverflow.com/questions/25830448/what-is-the-best-way-to-detect-orientation-in-an-app-extension/26023538#26023538 +- (FSCalendarOrientation)currentCalendarOrientation +{ + CGFloat scale = [UIScreen mainScreen].scale; + CGSize nativeSize = [UIScreen mainScreen].currentMode.size; + CGSize sizeInPoints = [UIScreen mainScreen].bounds.size; + FSCalendarOrientation orientation = scale * sizeInPoints.width == nativeSize.width ? FSCalendarOrientationPortrait : FSCalendarOrientationLandscape; + return orientation; +} + +- (NSInteger)numberOfHeadPlaceholdersForMonth:(NSDate *)month +{ + NSInteger currentWeekday = [self weekdayOfDate:month]; + NSInteger number = ((currentWeekday- _firstWeekday) + 7) % 7 ?: (7 * (!self.floatingMode&&self.showsPlaceholders)); + return number; +} + +#pragma mark - Delegate + +- (BOOL)shouldSelectDate:(NSDate *)date +{ + if (_delegate && [_delegate respondsToSelector:@selector(calendar:shouldSelectDate:)]) { + return [_delegate calendar:self shouldSelectDate:date]; + } + return YES; +} + +- (void)didSelectDate:(NSDate *)date +{ + [self enqueueSelectedDate:date]; + if (_delegate && [_delegate respondsToSelector:@selector(calendar:didSelectDate:)]) { + [_delegate calendar:self didSelectDate:date]; + } +} + +- (BOOL)shouldDeselectDate:(NSDate *)date +{ + if (_delegate && [_delegate respondsToSelector:@selector(calendar:shouldDeselectDate:)]) { + return [_delegate calendar:self shouldDeselectDate:date]; + } + return YES; +} + +- (void)didDeselectDate:(NSDate *)date +{ + if (_delegate && [_delegate respondsToSelector:@selector(calendar:didDeselectDate:)]) { + [_delegate calendar:self didDeselectDate:date]; + } +} + +- (void)currentPageDidChange +{ + if (_delegate && [_delegate respondsToSelector:@selector(calendarCurrentPageDidChange:)]) { + [_delegate calendarCurrentPageDidChange:self]; + } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + else if (_delegate && [_delegate respondsToSelector:@selector(calendarCurrentMonthDidChange:)]) { + [_delegate calendarCurrentMonthDidChange:self]; + } +#pragma GCC diagnostic pop +} + +- (UIColor *)preferredSelectionColorForDate:(NSDate *)date +{ + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:selectionColorForDate:)]) { + UIColor *color = [self.delegateAppearance calendar:self appearance:self.appearance selectionColorForDate:date]; + return color; + } + return nil; +} + +- (UIColor *)preferredTitleDefaultColorForDate:(NSDate *)date +{ + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:titleDefaultColorForDate:)]) { + UIColor *color = [self.delegateAppearance calendar:self appearance:self.appearance titleDefaultColorForDate:date]; + return color; + } + return nil; +} + +- (UIColor *)preferredTitleSelectionColorForDate:(NSDate *)date +{ + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:titleSelectionColorForDate:)]) { + UIColor *color = [self.delegateAppearance calendar:self appearance:self.appearance titleSelectionColorForDate:date]; + return color; + } + return nil; +} + +- (UIColor *)preferredSubtitleDefaultColorForDate:(NSDate *)date +{ + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:subtitleDefaultColorForDate:)]) { + UIColor *color = [self.delegateAppearance calendar:self appearance:self.appearance subtitleDefaultColorForDate:date]; + return color; + } + return nil; +} + +- (UIColor *)preferredSubtitleSelectionColorForDate:(NSDate *)date +{ + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:subtitleSelectionColorForDate:)]) { + UIColor *color = [self.delegateAppearance calendar:self appearance:self.appearance subtitleSelectionColorForDate:date]; + return color; + } + return nil; +} + +- (id)preferredEventColorForDate:(NSDate *)date +{ + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:eventColorsForDate:)]) { + NSArray *colors = [self.delegateAppearance calendar:self appearance:self.appearance eventColorsForDate:date]; + if (colors) { + return colors; + } + } + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:eventColorForDate:)]) { + UIColor *color = [self.delegateAppearance calendar:self appearance:self.appearance eventColorForDate:date]; + if (color) { + return color; + } + } + return nil; +} + +- (UIColor *)preferredBorderDefaultColorForDate:(NSDate *)date +{ + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:borderDefaultColorForDate:)]) { + UIColor *color = [self.delegateAppearance calendar:self appearance:self.appearance borderDefaultColorForDate:date]; + return color; + } + return nil; +} + +- (UIColor *)preferredBorderSelectionColorForDate:(NSDate *)date +{ + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:borderSelectionColorForDate:)]) { + UIColor *color = [self.delegateAppearance calendar:self appearance:self.appearance borderSelectionColorForDate:date]; + return color; + } + return nil; +} + +- (FSCalendarCellShape)preferredCellShapeForDate:(NSDate *)date +{ + if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:cellShapeForDate:)]) { + FSCalendarCellShape cellShape = [self.delegateAppearance calendar:self appearance:self.appearance cellShapeForDate:date]; + return cellShape; + } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + else if (self.delegateAppearance && [self.delegateAppearance respondsToSelector:@selector(calendar:appearance:cellStyleForDate:)]) { + FSCalendarCellShape cellShape = (FSCalendarCellShape)[self.delegateAppearance calendar:self appearance:self.appearance cellStyleForDate:date]; + return cellShape; + } +#pragma GCC diagnostic pop + + return FSCalendarCellShapeCircle; +} + + +- (BOOL)boundingRectWillChange:(BOOL)animated +{ + if (self.delegate && [self.delegate respondsToSelector:@selector(calendar:boundingRectWillChange:animated:)]) { + CGRect boundingRect = (CGRect){CGPointZero,[self sizeThatFits:self.frame.size]}; + if (!CGRectEqualToRect((CGRect){CGPointZero,self.frame.size}, boundingRect)) { + [self.delegate calendar:self boundingRectWillChange:boundingRect animated:animated]; + return YES; + } + } + return NO; +} + +#pragma mark - DataSource + +- (NSString *)subtitleForDate:(NSDate *)date +{ +#if !TARGET_INTERFACE_BUILDER + if (_dataSource && [_dataSource respondsToSelector:@selector(calendar:subtitleForDate:)]) { + return [_dataSource calendar:self subtitleForDate:date]; + } + return nil; +#else + return _appearance.fakeSubtitles ? @"test" : nil; +#endif +} + +- (UIImage *)imageForDate:(NSDate *)date +{ + if (_dataSource && [_dataSource respondsToSelector:@selector(calendar:imageForDate:)]) { + return [_dataSource calendar:self imageForDate:date]; + } + return nil; +} + +- (NSInteger)numberOfEventsForDate:(NSDate *)date +{ +#if !TARGET_INTERFACE_BUILDER + + if (_dataSource && [_dataSource respondsToSelector:@selector(calendar:numberOfEventsForDate:)]) { + return [_dataSource calendar:self numberOfEventsForDate:date]; + } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + if (_dataSource && [_dataSource respondsToSelector:@selector(calendar:hasEventForDate:)]) { + return [_dataSource calendar:self hasEventForDate:date]; + } + #pragma GCC diagnostic pop + +#else + if ([@[@3,@5] containsObject:@([self dayOfDate:date])]) { + return 1; + } + if ([@[@8,@16] containsObject:@([self dayOfDate:date])]) { + return 2; + } + if ([@[@20,@25] containsObject:@([self dayOfDate:date])]) { + return 3; + } +#endif + return 0; + +} + +- (NSDate *)minimumDateForCalendar +{ + if (_dataSource && [_dataSource respondsToSelector:@selector(minimumDateForCalendar:)]) { + _minimumDate = [self dateByIgnoringTimeComponentsOfDate:[_dataSource minimumDateForCalendar:self]]; + } + if (!_minimumDate) { + _minimumDate = [self dateWithYear:1970 month:1 day:1]; + } + return _minimumDate; +} + +- (NSDate *)maximumDateForCalendar +{ + if (_dataSource && [_dataSource respondsToSelector:@selector(maximumDateForCalendar:)]) { + _maximumDate = [self dateByIgnoringTimeComponentsOfDate:[_dataSource maximumDateForCalendar:self]]; + } + if (!_maximumDate) { + _maximumDate = [self dateWithYear:2099 month:12 day:31]; + } + return _maximumDate; +} + +@end + +#pragma mark - DateTools + + +@implementation FSCalendar (DateTools) + +#pragma mark - Public methods + +- (NSInteger)yearOfDate:(NSDate *)date +{ + NSDateComponents *component = [self.calendar components:NSCalendarUnitYear fromDate:date]; + return component.year; +} + +- (NSInteger)monthOfDate:(NSDate *)date +{ + NSDateComponents *component = [self.calendar components:NSCalendarUnitMonth + fromDate:date]; + return component.month; +} + +- (NSInteger)dayOfDate:(NSDate *)date +{ + NSDateComponents *component = [self.calendar components:NSCalendarUnitDay + fromDate:date]; + return component.day; +} + +- (NSInteger)weekdayOfDate:(NSDate *)date +{ + NSDateComponents *component = [self.calendar components:NSCalendarUnitWeekday fromDate:date]; + return component.weekday; +} + +- (NSInteger)weekOfDate:(NSDate *)date +{ + NSDateComponents *component = [self.calendar components:NSCalendarUnitWeekOfYear fromDate:date]; + return component.weekOfYear; +} + +- (NSInteger)hourOfDate:(NSDate *)date +{ + NSDateComponents *component = [self.calendar components:NSCalendarUnitHour + fromDate:date]; + return component.hour; +} + +- (NSInteger)miniuteOfDate:(NSDate *)date +{ + NSDateComponents *component = [self.calendar components:NSCalendarUnitMinute + fromDate:date]; + return component.minute; +} + +- (NSInteger)secondOfDate:(NSDate *)date +{ + NSDateComponents *component = [self.calendar components:NSCalendarUnitSecond + fromDate:date]; + return component.second; +} + +- (NSInteger)numberOfRowsInMonth:(NSDate *)month +{ + if (!month) return 0; + if (self.showsPlaceholders) return 6; + NSDate *firstDayOfMonth = [self beginingOfMonthOfDate:month]; + NSInteger weekdayOfFirstDay = [self weekdayOfDate:firstDayOfMonth]; + NSInteger numberOfDaysInMonth = [self numberOfDatesInMonthOfDate:month]; + NSInteger numberOfPlaceholdersForPrev = ((weekdayOfFirstDay - _firstWeekday) + 7) % 7; + NSInteger headDayCount = numberOfDaysInMonth + numberOfPlaceholdersForPrev; + NSInteger numberOfRows = (headDayCount/7) + (headDayCount%7>0); + return numberOfRows; +} + +- (NSDate *)dateByIgnoringTimeComponentsOfDate:(NSDate *)date +{ + NSDateComponents *components = [self.calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:date]; + components.hour = FSCalendarDefaultHourComponent; + return [self.calendar dateFromComponents:components]; +} + +- (NSDate *)beginingOfMonthOfDate:(NSDate *)date +{ + NSDateComponents *components = [self.calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:date]; + components.day = 1; + return [self.calendar dateFromComponents:components]; +} + +- (NSDate *)endOfMonthOfDate:(NSDate *)date +{ + NSDateComponents *components = [self.calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:date]; + components.month++; + components.day = 0; + return [self.calendar dateFromComponents:components]; +} + +- (NSDate *)beginingOfWeekOfDate:(NSDate *)date +{ + NSDateComponents *weekdayComponents = [self.calendar components:NSCalendarUnitWeekday fromDate:date]; + NSDateComponents *componentsToSubtract = self.components; + componentsToSubtract.day = - (weekdayComponents.weekday - self.calendar.firstWeekday); + componentsToSubtract.day = (componentsToSubtract.day-7) % 7; + NSDate *beginningOfWeek = [self.calendar dateByAddingComponents:componentsToSubtract toDate:date options:0]; + NSDateComponents *components = [self.calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:beginningOfWeek]; + beginningOfWeek = [self.calendar dateFromComponents:components]; + componentsToSubtract.day = NSIntegerMax; + return beginningOfWeek; +} + +- (NSDate *)middleOfWeekFromDate:(NSDate *)date +{ + NSDateComponents *weekdayComponents = [self.calendar components:NSCalendarUnitWeekday fromDate:date]; + NSDateComponents *componentsToSubtract = self.components; + componentsToSubtract.day = - (weekdayComponents.weekday - self.calendar.firstWeekday) + 3; + NSDate *middleOfWeek = [self.calendar dateByAddingComponents:componentsToSubtract toDate:date options:0]; + NSDateComponents *components = [self.calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:middleOfWeek]; + middleOfWeek = [self.calendar dateFromComponents:components]; + componentsToSubtract.day = NSIntegerMax; + return middleOfWeek; +} + +- (NSDate *)tomorrowOfDate:(NSDate *)date +{ + NSDateComponents *components = [self.calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:date]; + components.day++; + components.hour = FSCalendarDefaultHourComponent; + return [self.calendar dateFromComponents:components]; +} + +- (NSDate *)yesterdayOfDate:(NSDate *)date +{ + NSDateComponents *components = [self.calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:date]; + components.day--; + components.hour = FSCalendarDefaultHourComponent; + return [self.calendar dateFromComponents:components]; +} + +- (NSInteger)numberOfDatesInMonthOfDate:(NSDate *)date +{ + NSRange days = [self.calendar rangeOfUnit:NSCalendarUnitDay + inUnit:NSCalendarUnitMonth + forDate:date]; + return days.length; +} + +- (NSDate *)dateFromString:(NSString *)string format:(NSString *)format +{ + self.formatter.dateFormat = format; + return [self.formatter dateFromString:string]; +} + +- (NSDate *)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day +{ + NSDateComponents *components = self.components; + components.year = year; + components.month = month; + components.day = day; + components.hour = FSCalendarDefaultHourComponent; + NSDate *date = [self.calendar dateFromComponents:components]; + components.year = NSIntegerMax; + components.month = NSIntegerMax; + components.day = NSIntegerMax; + components.hour = NSIntegerMax; + return date; +} + +- (NSDate *)dateByAddingYears:(NSInteger)years toDate:(NSDate *)date +{ + NSDateComponents *components = self.components; + components.year = years; + NSDate *d = [self.calendar dateByAddingComponents:components toDate:date options:0]; + components.year = NSIntegerMax; + return d; +} + +- (NSDate *)dateBySubstractingYears:(NSInteger)years fromDate:(NSDate *)date +{ + return [self dateByAddingYears:-years toDate:date]; +} + +- (NSDate *)dateByAddingMonths:(NSInteger)months toDate:(NSDate *)date +{ + NSDateComponents *components = self.components; + components.month = months; + NSDate *d = [self.calendar dateByAddingComponents:components toDate:date options:0]; + components.month = NSIntegerMax; + return d; +} + +- (NSDate *)dateBySubstractingMonths:(NSInteger)months fromDate:(NSDate *)date +{ + return [self dateByAddingMonths:-months toDate:date]; +} + +- (NSDate *)dateByAddingWeeks:(NSInteger)weeks toDate:(NSDate *)date +{ + NSDateComponents *components = self.components; + components.weekOfYear = weeks; + NSDate *d = [self.calendar dateByAddingComponents:components toDate:date options:0]; + components.weekOfYear = NSIntegerMax; + return d; +} + +- (NSDate *)dateBySubstractingWeeks:(NSInteger)weeks fromDate:(NSDate *)date +{ + return [self dateByAddingWeeks:-weeks toDate:date]; +} + +- (NSDate *)dateByAddingDays:(NSInteger)days toDate:(NSDate *)date +{ + NSDateComponents *components = self.components; + components.day = days; + NSDate *d = [self.calendar dateByAddingComponents:components toDate:date options:0]; + components.day = NSIntegerMax; + return d; +} + +- (NSDate *)dateBySubstractingDays:(NSInteger)days fromDate:(NSDate *)date +{ + return [self dateByAddingDays:-days toDate:date]; +} + +- (NSInteger)yearsFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate +{ + NSDateComponents *components = [self.calendar components:NSCalendarUnitYear + fromDate:fromDate + toDate:toDate + options:0]; + return components.year; +} + +- (NSInteger)monthsFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate +{ + NSDateComponents *components = [self.calendar components:NSCalendarUnitMonth + fromDate:fromDate + toDate:toDate + options:0]; + return components.month; +} + +- (NSInteger)weeksFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate +{ + NSDateComponents *components = [self.calendar components:NSCalendarUnitWeekOfYear + fromDate:fromDate + toDate:toDate + options:0]; + return components.weekOfYear; +} + +- (NSInteger)daysFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate +{ + NSDateComponents *components = [self.calendar components:NSCalendarUnitDay + fromDate:fromDate + toDate:toDate + options:0]; + return components.day; +} + +- (BOOL)isDate:(NSDate *)date1 equalToDate:(NSDate *)date2 toCalendarUnit:(FSCalendarUnit)unit +{ + switch (unit) { + case FSCalendarUnitMonth: + return [self yearOfDate:date1] == [self yearOfDate:date2] && [self monthOfDate:date1] == [self monthOfDate:date2]; + case FSCalendarUnitWeekOfYear: + return [self yearOfDate:date1] == [self yearOfDate:date2] && [self weekOfDate:date1] == [self weekOfDate:date2]; + case FSCalendarUnitDay: + return [self yearOfDate:date1] == [self yearOfDate:date2] && [self monthOfDate:date1] == [self monthOfDate:date2] && [self dayOfDate:date1] == [self dayOfDate:date2]; + } + return NO; +} + +- (BOOL)isDateInToday:(NSDate *)date +{ + return [self isDate:date equalToDate:_today toCalendarUnit:FSCalendarUnitDay]; +} + +- (NSString *)stringFromDate:(NSDate *)date format:(NSString *)format +{ + self.formatter.dateFormat = format; + return [self.formatter stringFromDate:date]; +} + +- (NSString *)stringFromDate:(NSDate *)date +{ + return [self stringFromDate:date format:@"yyyy-MM-dd"]; +} + +@end + +#pragma mark - Deprecate + +@implementation FSCalendar (Deprecated) + +- (void)setCurrentMonth:(NSDate *)currentMonth +{ + self.currentPage = currentMonth; +} + +- (NSDate *)currentMonth +{ + return self.currentPage; +} + +- (void)setFlow:(FSCalendarFlow)flow +{ + self.scrollDirection = (FSCalendarScrollDirection)flow; +} + +- (FSCalendarFlow)flow +{ + return (FSCalendarFlow)self.scrollDirection; +} + +- (void)setSelectedDate:(NSDate *)selectedDate +{ + [self selectDate:selectedDate]; +} + +- (void)setSelectedDate:(NSDate *)selectedDate animate:(BOOL)animate +{ + [self selectDate:selectedDate scrollToDate:animate]; +} + +- (BOOL)date:(NSDate *)date sharesSameMonthWithDate:(NSDate *)anotherDate +{ + return [self yearOfDate:date] == [self yearOfDate:anotherDate] && [self monthOfDate:date] == [self monthOfDate:anotherDate]; +} + +- (BOOL)date:(NSDate *)date sharesSameWeekWithDate:(NSDate *)anotherDate +{ + return [self yearOfDate:date] == [self yearOfDate:anotherDate] && [self weekOfDate:date] == [self weekOfDate:anotherDate]; +} + +- (BOOL)date:(NSDate *)date sharesSameDayWithDate:(NSDate *)anotherDate +{ + return [self yearOfDate:date] == [self yearOfDate:anotherDate] && [self monthOfDate:date] == [self monthOfDate:anotherDate] && [self dayOfDate:date] == [self dayOfDate:anotherDate]; +} + +@end + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAnimator.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAnimator.h new file mode 100644 index 0000000..10165e1 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAnimator.h @@ -0,0 +1,37 @@ +// +// FSCalendarAnimator.h +// FSCalendar +// +// Created by dingwenchao on 3/13/16. +// Copyright © 2016 wenchaoios. All rights reserved. +// + +#import +#import "FSCalendar.h" +#import "FSCalendarCollectionView.h" +#import "FSCalendarFlowLayout.h" +#import "FSCalendarDynamicHeader.h" + +typedef NS_ENUM(NSUInteger, FSCalendarTransition) { + FSCalendarTransitionNone, + FSCalendarTransitionMonthToWeek, + FSCalendarTransitionWeekToMonth +}; +typedef NS_ENUM(NSUInteger, FSCalendarTransitionState) { + FSCalendarTransitionStateIdle, + FSCalendarTransitionStateInProgress +}; + +@interface FSCalendarAnimator : NSObject + +@property (weak, nonatomic) FSCalendar *calendar; +@property (weak, nonatomic) FSCalendarCollectionView *collectionView; +@property (weak, nonatomic) FSCalendarFlowLayout *collectionViewLayout; + +@property (assign, nonatomic) FSCalendarTransition transition; +@property (assign, nonatomic) FSCalendarTransitionState state; + +- (void)performScopeTransitionFromScope:(FSCalendarScope)fromScope toScope:(FSCalendarScope)toScope animated:(BOOL)animated; +- (void)performBoudingRectTransitionFromMonth:(NSDate *)fromMonth toMonth:(NSDate *)toMonth duration:(CGFloat)duration; + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAnimator.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAnimator.m new file mode 100644 index 0000000..04fe117 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAnimator.m @@ -0,0 +1,394 @@ +// +// FSCalendarAnimator.m +// FSCalendar +// +// Created by Wenchao Ding on 3/13/16. +// Copyright © 2016 Wenchao Ding. All rights reserved. +// + +#import "FSCalendarAnimator.h" +#import +#import "UIView+FSExtension.h" + +@implementation FSCalendarAnimator + +#pragma mark - Public methods + +- (void)performScopeTransitionFromScope:(FSCalendarScope)fromScope toScope:(FSCalendarScope)toScope animated:(BOOL)animated +{ + if (fromScope == toScope) { + self.transition = FSCalendarTransitionNone; + return; + } + if (fromScope == FSCalendarScopeMonth && toScope == FSCalendarScopeWeek) { + self.transition = FSCalendarTransitionMonthToWeek; + } else if (fromScope == FSCalendarScopeWeek && toScope == FSCalendarScopeMonth) { + self.transition = FSCalendarTransitionWeekToMonth; + } + + // Start transition + self.state = FSCalendarTransitionStateInProgress; + + switch (self.transition) { + + case FSCalendarTransitionMonthToWeek: { + + CGSize contentSize = [self.calendar sizeThatFits:self.calendar.frame.size scope:FSCalendarScopeWeek]; + CGRect targetBounds = (CGRect){CGPointZero,contentSize}; + + NSInteger focusedRowNumber = 0; + if (self.calendar.focusOnSingleSelectedDate) { + NSDate *focusedDate = self.calendar.selectedDate; + if (focusedDate) { + UICollectionViewLayoutAttributes *attributes = [self.collectionViewLayout layoutAttributesForItemAtIndexPath:[self.calendar indexPathForDate:focusedDate scope:FSCalendarScopeMonth]]; + CGPoint focuedCenter = attributes.center; + if (CGRectContainsPoint(self.collectionView.bounds, focuedCenter)) { + switch (self.collectionViewLayout.scrollDirection) { + case UICollectionViewScrollDirectionHorizontal: { + focusedRowNumber = attributes.indexPath.item%6; + break; + } + case UICollectionViewScrollDirectionVertical: { + focusedRowNumber = attributes.indexPath.item/7; + break; + } + } + } else { + focusedDate = nil; + } + } + if (!focusedDate) { + focusedDate = self.calendar.today; + if (focusedDate) { + UICollectionViewLayoutAttributes *attributes = [self.collectionViewLayout layoutAttributesForItemAtIndexPath:[self.calendar indexPathForDate:focusedDate scope:FSCalendarScopeMonth]]; + CGPoint focuedCenter = attributes.center; + if (CGRectContainsPoint(self.collectionView.bounds, focuedCenter)) { + switch (self.collectionViewLayout.scrollDirection) { + case UICollectionViewScrollDirectionHorizontal: { + focusedRowNumber = attributes.indexPath.item%6; + break; + } + case UICollectionViewScrollDirectionVertical: { + focusedRowNumber = attributes.indexPath.item/7; + break; + } + } + } + } + } + } + + NSDate *currentPage = self.calendar.currentPage; + NSDate *minimumPage = [self.calendar beginingOfMonthOfDate:self.calendar.minimumDate]; + NSInteger visibleSection = [self.calendar monthsFromDate:minimumPage toDate:currentPage]; + NSIndexPath *firstIndexPath = [NSIndexPath indexPathForItem:0 inSection:visibleSection]; + NSDate *firstDate = [self.calendar dateForIndexPath:firstIndexPath scope:FSCalendarScopeMonth]; + currentPage = [self.calendar dateByAddingDays:focusedRowNumber*7 toDate:firstDate]; + + Ivar currentPageIvar = class_getInstanceVariable(FSCalendar.class, "_currentPage"); + object_setIvar(self.calendar, currentPageIvar, currentPage); + + self.calendar.contentView.clipsToBounds = YES; + self.calendar.daysContainer.clipsToBounds = YES; + if (animated) { + CGFloat duration = 0.3; + // Perform alpha animation + CABasicAnimation *opacity = [CABasicAnimation animationWithKeyPath:@"opacity"]; + opacity.duration = duration*0.6; + opacity.removedOnCompletion = NO; + opacity.fillMode = kCAFillModeForwards; + opacity.toValue = @0; + [self.collectionView.visibleCells enumerateObjectsUsingBlock:^(FSCalendarCell *cell, NSUInteger idx, BOOL *stop) { + if (CGRectContainsPoint(self.collectionView.bounds, cell.center)) { + BOOL shouldPerformAlpha = NO; + NSIndexPath *indexPath = [self.collectionView indexPathForCell:cell]; + switch (self.collectionViewLayout.scrollDirection) { + case UICollectionViewScrollDirectionHorizontal: { + shouldPerformAlpha = indexPath.item%6 != focusedRowNumber; + break; + } + case UICollectionViewScrollDirectionVertical: { + shouldPerformAlpha = indexPath.item/7 != focusedRowNumber; + break; + } + } + if (shouldPerformAlpha) { + [cell.contentView.layer addAnimation:opacity forKey:@"opacity"]; + } + } + }]; + + // Perform path and frame animation + CABasicAnimation *path = [CABasicAnimation animationWithKeyPath:@"path"]; + path.fromValue = (id)self.calendar.maskLayer.path; + path.toValue = (id)[UIBezierPath bezierPathWithRect:targetBounds].CGPath; + path.duration = duration; + path.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; + [CATransaction begin]; + [CATransaction setCompletionBlock:^{ + self.state = FSCalendarTransitionStateIdle; + self.transition = FSCalendarTransitionNone; + self.collectionViewLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + self.calendar.header.scrollDirection = self.collectionViewLayout.scrollDirection; + self.calendar.maskLayer.path = [UIBezierPath bezierPathWithRect:targetBounds].CGPath; + [self.collectionView reloadData]; + [self.collectionView layoutIfNeeded]; + [self.calendar.header reloadData]; + [self.calendar.header layoutIfNeeded]; + self.calendar.needsAdjustingMonthPosition = YES; + self.calendar.needsAdjustingViewFrame = YES; + [self.calendar setNeedsLayout]; + self.calendar.contentView.clipsToBounds = NO; + self.calendar.daysContainer.clipsToBounds = NO; + }]; + [CATransaction setAnimationDuration:duration]; + [self.calendar.maskLayer addAnimation:path forKey:@"path"]; + [CATransaction commit]; + + if (self.calendar.delegate && ([self.calendar.delegate respondsToSelector:@selector(calendar:boundingRectWillChange:animated:)] || [self.calendar.delegate respondsToSelector:@selector(calendarCurrentScopeWillChange:animated:)])) { + + [UIView beginAnimations:@"delegateTranslation" context:"translation"]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; + [UIView setAnimationDuration:duration]; + self.collectionView.fs_top = -focusedRowNumber*self.calendar.preferredRowHeight; + self.calendar.bottomBorder.fs_top = CGRectGetMaxY(targetBounds); + if ([self.calendar.delegate respondsToSelector:@selector(calendar:boundingRectWillChange:animated:)]) { + [self.calendar.delegate calendar:self.calendar boundingRectWillChange:targetBounds animated:animated]; + } else { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + [self.calendar.delegate calendarCurrentScopeWillChange:self.calendar animated:animated]; +#pragma GCC diagnostic pop + } + [UIView commitAnimations]; + } + + } else { + + self.state = FSCalendarTransitionStateIdle; + self.transition = FSCalendarTransitionNone; + self.collectionViewLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + self.calendar.header.scrollDirection = self.collectionViewLayout.scrollDirection; + self.calendar.needsAdjustingViewFrame = YES; + self.calendar.bottomBorder.frame = CGRectMake(0, contentSize.height, self.calendar.fs_width, 1); + self.calendar.maskLayer.path = [UIBezierPath bezierPathWithRect:targetBounds].CGPath; + self.calendar.bottomBorder.fs_top = CGRectGetMaxY(targetBounds); + [self.collectionView reloadData]; + [self.collectionView layoutIfNeeded]; + [self.calendar.header reloadData]; + [self.calendar.header layoutIfNeeded]; + self.calendar.needsAdjustingMonthPosition = YES; + self.calendar.needsAdjustingViewFrame = YES; + [self.calendar setNeedsLayout]; + + self.calendar.contentView.clipsToBounds = NO; + self.calendar.daysContainer.clipsToBounds = NO; + + if (self.calendar.delegate && [self.calendar.delegate respondsToSelector:@selector(calendar:boundingRectWillChange:animated:)]) { + [self.calendar.delegate calendar:self.calendar boundingRectWillChange:targetBounds animated:animated]; + } else if (self.calendar.delegate && [self.calendar.delegate respondsToSelector:@selector(calendarCurrentScopeWillChange:animated:)]) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + [self.calendar.delegate calendarCurrentScopeWillChange:self.calendar animated:animated]; +#pragma GCC diagnostic pop + } + + } + + break; + } + + case FSCalendarTransitionWeekToMonth: { + + CGSize contentSize = [self.calendar sizeThatFits:self.calendar.frame.size scope:FSCalendarScopeMonth]; + CGRect targetBounds = (CGRect){CGPointZero,contentSize}; + + NSInteger focusedRowNumber = 0; + NSDate *currentPage = self.calendar.currentPage; + NSDate *firstDayOfMonth = nil; + if (self.calendar.focusOnSingleSelectedDate) { + NSDate *focusedDate = self.calendar.selectedDate; + if (focusedDate) { + UICollectionViewLayoutAttributes *attributes = [self.collectionViewLayout layoutAttributesForItemAtIndexPath:[self.calendar indexPathForDate:focusedDate scope:FSCalendarScopeWeek]]; + CGPoint focuedCenter = attributes.center; + if (CGRectContainsPoint(self.collectionView.bounds, focuedCenter)) { + firstDayOfMonth = [self.calendar beginingOfMonthOfDate:focusedDate]; + } else { + focusedDate = nil; + } + } + if (!focusedDate) { + focusedDate = self.calendar.today; + if (focusedDate) { + UICollectionViewLayoutAttributes *attributes = [self.collectionViewLayout layoutAttributesForItemAtIndexPath:[self.calendar indexPathForDate:focusedDate scope:FSCalendarScopeWeek]]; + CGPoint focuedCenter = attributes.center; + if (CGRectContainsPoint(self.collectionView.bounds, focuedCenter)) { + firstDayOfMonth = [self.calendar beginingOfMonthOfDate:focusedDate]; + } + } + }; + } + firstDayOfMonth = firstDayOfMonth ?: [self.calendar beginingOfMonthOfDate:currentPage]; + NSInteger numberOfPlaceholdersForPrev = [self.calendar numberOfHeadPlaceholdersForMonth:firstDayOfMonth]; + NSDate *firstDateOfPage = [self.calendar dateBySubstractingDays:numberOfPlaceholdersForPrev fromDate:firstDayOfMonth]; + for (int i = 0; i < 6; i++) { + NSDate *currentRow = [self.calendar dateByAddingWeeks:i toDate:firstDateOfPage]; + if ([self.calendar isDate:currentRow equalToDate:currentPage toCalendarUnit:FSCalendarUnitDay]) { + focusedRowNumber = i; + currentPage = firstDayOfMonth; + break; + } + } + + Ivar currentPageIvar = class_getInstanceVariable(FSCalendar.class, "_currentPage"); + object_setIvar(self.calendar, currentPageIvar, currentPage); + + self.collectionViewLayout.scrollDirection = (UICollectionViewScrollDirection)self.calendar.scrollDirection; + self.calendar.header.scrollDirection = self.collectionViewLayout.scrollDirection; + + self.calendar.needsAdjustingMonthPosition = YES; + self.calendar.needsAdjustingViewFrame = YES; + [self.calendar layoutSubviews]; + [self.collectionView reloadData]; + [self.collectionView layoutIfNeeded]; + [self.calendar.header reloadData]; + [self.calendar.header layoutIfNeeded]; + + self.calendar.contentView.clipsToBounds = YES; + self.calendar.daysContainer.clipsToBounds = YES; + + if (animated) { + // Perform alpha animation + CGFloat duration = 0.3; + CABasicAnimation *opacity = [CABasicAnimation animationWithKeyPath:@"opacity"]; + opacity.duration = duration; + opacity.fromValue = @0; + opacity.toValue = @1; + opacity.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; + [self.collectionView.visibleCells enumerateObjectsUsingBlock:^(FSCalendarCell *cell, NSUInteger idx, BOOL *stop) { + if (CGRectContainsPoint(self.collectionView.bounds, cell.center)) { + BOOL shouldPerformAlpha = NO; + NSIndexPath *indexPath = [self.collectionView indexPathForCell:cell]; + switch (self.collectionViewLayout.scrollDirection) { + case UICollectionViewScrollDirectionHorizontal: { + shouldPerformAlpha = indexPath.item%6 != focusedRowNumber; + break; + } + case UICollectionViewScrollDirectionVertical: { + shouldPerformAlpha = indexPath.item/7 != focusedRowNumber; + break; + } + } + if (shouldPerformAlpha) { + [cell.contentView.layer addAnimation:opacity forKey:@"opacity"]; + } + } + }]; + + // Perform path and frame animation + BOOL oldDisableActions = [CATransaction disableActions]; + [CATransaction setDisableActions:NO]; + + CABasicAnimation *path = [CABasicAnimation animationWithKeyPath:@"path"]; + path.fromValue = (id)self.calendar.maskLayer.path; + path.toValue = (id)[UIBezierPath bezierPathWithRect:targetBounds].CGPath; + path.duration = duration; + path.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; + [CATransaction begin]; + [CATransaction setCompletionBlock:^{ + self.state = FSCalendarTransitionStateIdle; + self.transition = FSCalendarTransitionNone; + self.calendar.maskLayer.path = [UIBezierPath bezierPathWithRect:targetBounds].CGPath; + self.calendar.contentView.clipsToBounds = NO; + self.calendar.daysContainer.clipsToBounds = NO; + }]; + [CATransaction setAnimationDuration:duration]; + + self.calendar.needsAdjustingViewFrame = YES; + [self.calendar.maskLayer addAnimation:path forKey:@"path"]; + + [CATransaction commit]; + + if (self.calendar.delegate && ([self.calendar.delegate respondsToSelector:@selector(calendar:boundingRectWillChange:animated:)] || [self.calendar.delegate respondsToSelector:@selector(calendarCurrentScopeWillChange:animated:)])) { + self.collectionView.fs_top = -focusedRowNumber*self.calendar.preferredRowHeight; + [UIView setAnimationsEnabled:YES]; + [UIView beginAnimations:@"delegateTranslation" context:"translation"]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; + [UIView setAnimationDuration:duration]; + self.collectionView.fs_top = 0; + self.self.calendar.bottomBorder.frame = CGRectMake(0, contentSize.height, self.calendar.fs_width, 1); + if ([self.calendar.delegate respondsToSelector:@selector(calendar:boundingRectWillChange:animated:)]) { + [self.calendar.delegate calendar:self.calendar boundingRectWillChange:targetBounds animated:animated]; + } else { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + [self.calendar.delegate calendarCurrentScopeWillChange:self.calendar animated:animated]; +#pragma GCC diagnostic pop + } + [UIView commitAnimations]; + } + [CATransaction setDisableActions:oldDisableActions]; + + } else { + + self.state = FSCalendarTransitionStateIdle; + self.transition = FSCalendarTransitionNone; + self.calendar.needsAdjustingViewFrame = YES; + self.calendar.bottomBorder.frame = CGRectMake(0, contentSize.height, self.calendar.fs_width, 1); + self.calendar.maskLayer.path = [UIBezierPath bezierPathWithRect:targetBounds].CGPath; + self.calendar.contentView.clipsToBounds = NO; + self.calendar.daysContainer.clipsToBounds = NO; + + if (self.calendar.delegate && [self.calendar.delegate respondsToSelector:@selector(calendar:boundingRectWillChange:animated:)]) { + [self.calendar.delegate calendar:self.calendar boundingRectWillChange:targetBounds animated:animated]; + } else if (self.calendar.delegate && [self.calendar.delegate respondsToSelector:@selector(calendarCurrentScopeWillChange:animated:)]) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + [self.calendar.delegate calendarCurrentScopeWillChange:self.calendar animated:animated]; +#pragma GCC diagnostic pop + } + } + break; + } + default: + break; + } + +} + +- (void)performBoudingRectTransitionFromMonth:(NSDate *)fromMonth toMonth:(NSDate *)toMonth duration:(CGFloat)duration +{ + NSInteger lastRowCount = [self.calendar numberOfRowsInMonth:fromMonth]; + NSInteger currentRowCount = [self.calendar numberOfRowsInMonth:toMonth]; + if (lastRowCount != currentRowCount) { + CGFloat animationDuration = duration; + CGRect bounds = (CGRect){CGPointZero,[self.calendar sizeThatFits:self.calendar.frame.size]}; + self.state = FSCalendarTransitionStateInProgress; + [UIView animateWithDuration:animationDuration delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{ + if (self.calendar.delegate && [self.calendar.delegate respondsToSelector:@selector(calendar:boundingRectWillChange:animated:)]) { + if (!CGRectEqualToRect((CGRect){CGPointZero,self.calendar.frame.size}, bounds)) { + [self.calendar.delegate calendar:self.calendar boundingRectWillChange:bounds animated:YES]; + } + } + self.calendar.bottomBorder.fs_top = CGRectGetMaxY(bounds); + } completion:^(BOOL finished) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(MAX(0, duration-animationDuration) * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + self.calendar.needsAdjustingViewFrame = YES; + [self.calendar setNeedsLayout]; + self.state = FSCalendarTransitionStateIdle; + }); + }]; + + CABasicAnimation *path = [CABasicAnimation animationWithKeyPath:@"path"]; + path.fromValue = (id)self.calendar.maskLayer.path; + path.toValue = (id)[UIBezierPath bezierPathWithRect:bounds].CGPath; + path.duration = animationDuration*(currentRowCount>lastRowCount?1.25:0.75); + path.removedOnCompletion = NO; + path.fillMode = kCAFillModeForwards; + [self.calendar.maskLayer addAnimation:path forKey:@"path"]; + + } +} + + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAppearance.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAppearance.h new file mode 100644 index 0000000..5f31114 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAppearance.h @@ -0,0 +1,241 @@ +// +// FSCalendarAppearance.h +// Pods +// +// Created by DingWenchao on 6/29/15. +// Copyright © 2016 Wenchao Ding. All rights reserved. +// +// https://github.com/WenchaoD +// + +#import "FSCalendarConstance.h" + +@class FSCalendar; + +typedef NS_ENUM(NSInteger, FSCalendarCellState) { + FSCalendarCellStateNormal = 0, + FSCalendarCellStateSelected = 1, + FSCalendarCellStatePlaceholder = 1 << 1, + FSCalendarCellStateDisabled = 1 << 2, + FSCalendarCellStateToday = 1 << 3, + FSCalendarCellStateWeekend = 1 << 4, + FSCalendarCellStateTodaySelected = FSCalendarCellStateToday|FSCalendarCellStateSelected +}; + +typedef NS_ENUM(NSUInteger, FSCalendarCellShape) { + FSCalendarCellShapeCircle = 0, + FSCalendarCellShapeRectangle = 1 +}; + +typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) { + FSCalendarCaseOptionsHeaderUsesDefaultCase = 0, + FSCalendarCaseOptionsHeaderUsesUpperCase = 1, + + FSCalendarCaseOptionsWeekdayUsesDefaultCase = 0 << 4, + FSCalendarCaseOptionsWeekdayUsesUpperCase = 1 << 4, + FSCalendarCaseOptionsWeekdayUsesSingleUpperCase = 2 << 4, +}; + +/** + * FSCalendarAppearance determines the fonts and colors of components in the calendar. + * + * @see FSCalendarDelegateAppearance + */ +@interface FSCalendarAppearance : NSObject + +/** + * The font of the day text. + * + * @warning The size of font is adjusted by calendar size. To turn it off, set adjustsFontSizeToFitContentSize to NO; + */ +@property (strong, nonatomic) UIFont *titleFont; + +/** + * The font of the subtitle text. + * + * @warning The size of font is adjusted by calendar size. To turn it off, set adjustsFontSizeToFitContentSize to NO; + */ +@property (strong, nonatomic) UIFont *subtitleFont; + +/** + * The font of the weekday text. + * +* @warning The size of font is adjusted by calendar size. To turn it off, set adjustsFontSizeToFitContentSize to NO; + */ +@property (strong, nonatomic) UIFont *weekdayFont; + +/** + * The font of the month text. + * + * @warning The size of font is adjusted by calendar size. To turn it off, set adjustsFontSizeToFitContentSize to NO; + */ +@property (strong, nonatomic) UIFont *headerTitleFont; + +/** + * The vertical offset of the day text from default position. + */ +@property (assign, nonatomic) CGFloat titleVerticalOffset; + +/** + * The vertical offset of the suntitle text from default position. + */ +@property (assign, nonatomic) CGFloat subtitleVerticalOffset; + +/** + * The color of event dots. + */ +@property (strong, nonatomic) UIColor *eventColor; + +/** + * The color of weekday text. + */ +@property (strong, nonatomic) UIColor *weekdayTextColor; + +/** + * The color of month header text. + */ +@property (strong, nonatomic) UIColor *headerTitleColor; + +/** + * The date format of the month header. + */ +@property (strong, nonatomic) NSString *headerDateFormat; + +/** + * The alpha value of month label staying on the fringes. + */ +@property (assign, nonatomic) CGFloat headerMinimumDissolvedAlpha; + +/** + * The day text color for unselected state. + */ +@property (strong, nonatomic) UIColor *titleDefaultColor; + +/** + * The day text color for selected state. + */ +@property (strong, nonatomic) UIColor *titleSelectionColor; + +/** + * The day text color for today in the calendar. + */ +@property (strong, nonatomic) UIColor *titleTodayColor; + +/** + * The day text color for days out of current month. + */ +@property (strong, nonatomic) UIColor *titlePlaceholderColor; + +/** + * The day text color for weekend. + */ +@property (strong, nonatomic) UIColor *titleWeekendColor; + +/** + * The subtitle text color for unselected state. + */ +@property (strong, nonatomic) UIColor *subtitleDefaultColor; + +/** + * The subtitle text color for selected state. + */ +@property (strong, nonatomic) UIColor *subtitleSelectionColor; + +/** + * The subtitle text color for today in the calendar. + */ +@property (strong, nonatomic) UIColor *subtitleTodayColor; + +/** + * The subtitle text color for days out of current month. + */ +@property (strong, nonatomic) UIColor *subtitlePlaceholderColor; + +/** + * The subtitle text color for weekend. + */ +@property (strong, nonatomic) UIColor *subtitleWeekendColor; + +/** + * The fill color of the shape for selected state. + */ +@property (strong, nonatomic) UIColor *selectionColor; + +/** + * The fill color of the shape for today. + */ +@property (strong, nonatomic) UIColor *todayColor; + +/** + * The fill color of the shape for today and selected state. + */ +@property (strong, nonatomic) UIColor *todaySelectionColor; + +/** + * The border color of the shape for unselected state. + */ +@property (strong, nonatomic) UIColor *borderDefaultColor; + +/** + * The border color of the shape for selected state. + */ +@property (strong, nonatomic) UIColor *borderSelectionColor; + +/** + * The shape appears when a day is selected or today. + * + * @see FSCalendarCellShape + */ +@property (assign, nonatomic) FSCalendarCellShape cellShape; + +/** + * The case options manage the case of month label and weekday symbols. + * + * @see FSCalendarCaseOptions + */ +@property (assign, nonatomic) FSCalendarCaseOptions caseOptions; + +/** + * A Boolean value indicates whether the calendar should adjust font size by its content size. + * + * @see titleFont + * @see subtitleFont + * @see weekdayFont + * @see headerTitleFont + */ +@property (assign, nonatomic) BOOL adjustsFontSizeToFitContentSize; + +#if TARGET_INTERFACE_BUILDER + +// For preview only +@property (assign, nonatomic) BOOL fakeSubtitles; +@property (assign, nonatomic) NSInteger fakedSelectedDay; + +#endif + +/** + * Triggers an appearance update. + */ +- (void)invalidateAppearance; + +@end + +/** + * These functions and attributes are deprecated. + */ +@interface FSCalendarAppearance (Deprecated) + +@property (assign, nonatomic) FSCalendarCellStyle cellStyle FSCalendarDeprecated('cellShape'); +@property (assign, nonatomic) BOOL useVeryShortWeekdaySymbols FSCalendarDeprecated('caseOptions'); +@property (assign, nonatomic) BOOL autoAdjustTitleSize FSCalendarDeprecated('adjustFontSizeToFitContentSize'); +@property (assign, nonatomic) BOOL adjustsFontSizeToFitCellSize FSCalendarDeprecated('adjustFontSizeToFitContentSize'); + +@property (assign, nonatomic) CGFloat titleTextSize FSCalendarDeprecated('titleFont'); +@property (assign, nonatomic) CGFloat subtitleTextSize FSCalendarDeprecated('subtitleFont'); +@property (assign, nonatomic) CGFloat weekdayTextSize FSCalendarDeprecated('weekdayFont'); +@property (assign, nonatomic) CGFloat headerTitleTextSize FSCalendarDeprecated('headerTitleFont'); + +@end + + + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAppearance.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAppearance.m new file mode 100644 index 0000000..b7b46ea --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarAppearance.m @@ -0,0 +1,745 @@ +// +// FSCalendarAppearance.m +// Pods +// +// Created by DingWenchao on 6/29/15. +// Copyright © 2016 Wenchao Ding. All rights reserved. +// +// https://github.com/WenchaoD +// + +#import "FSCalendarAppearance.h" +#import "FSCalendarDynamicHeader.h" +#import "UIView+FSExtension.h" + +@interface FSCalendarAppearance () + +@property (weak , nonatomic) FSCalendar *calendar; + +@property (strong, nonatomic) NSMutableDictionary *backgroundColors; +@property (strong, nonatomic) NSMutableDictionary *titleColors; +@property (strong, nonatomic) NSMutableDictionary *subtitleColors; +@property (strong, nonatomic) NSMutableDictionary *borderColors; + +@property (strong, nonatomic) NSString *titleFontName; +@property (strong, nonatomic) NSString *subtitleFontName; +@property (strong, nonatomic) NSString *weekdayFontName; +@property (strong, nonatomic) NSString *headerTitleFontName; + +@property (assign, nonatomic) CGFloat titleFontSize; +@property (assign, nonatomic) CGFloat subtitleFontSize; +@property (assign, nonatomic) CGFloat weekdayFontSize; +@property (assign, nonatomic) CGFloat headerTitleFontSize; + +@property (assign, nonatomic) CGFloat preferredTitleFontSize; +@property (assign, nonatomic) CGFloat preferredSubtitleFontSize; +@property (assign, nonatomic) CGFloat preferredWeekdayFontSize; +@property (assign, nonatomic) CGFloat preferredHeaderTitleFontSize; + +@property (readonly, nonatomic) UIFont *preferredTitleFont; +@property (readonly, nonatomic) UIFont *preferredSubtitleFont; +@property (readonly, nonatomic) UIFont *preferredWeekdayFont; +@property (readonly, nonatomic) UIFont *preferredHeaderTitleFont; + +- (void)adjustTitleIfNecessary; + +- (void)invalidateFonts; +- (void)invalidateTextColors; +- (void)invalidateTitleFont; +- (void)invalidateSubtitleFont; +- (void)invalidateWeekdayFont; +- (void)invalidateHeaderFont; +- (void)invalidateTitleTextColor; +- (void)invalidateSubtitleTextColor; +- (void)invalidateWeekdayTextColor; +- (void)invalidateHeaderTextColor; + +- (void)invalidateBorderColors; +- (void)invalidateBackgroundColors; +- (void)invalidateEventColors; +- (void)invalidateCellShapes; + +@end + +@implementation FSCalendarAppearance + +- (instancetype)init +{ + self = [super init]; + if (self) { + + _adjustsFontSizeToFitContentSize = YES; + + _titleFontSize = _preferredTitleFontSize = FSCalendarStandardTitleTextSize; + _subtitleFontSize = _preferredSubtitleFontSize = FSCalendarStandardSubtitleTextSize; + _weekdayFontSize = _preferredWeekdayFontSize = FSCalendarStandardWeekdayTextSize; + _headerTitleFontSize = _preferredHeaderTitleFontSize = FSCalendarStandardHeaderTextSize; + + _titleFontName = [UIFont systemFontOfSize:1].fontName; + _subtitleFontName = [UIFont systemFontOfSize:1].fontName; + _weekdayFontName = [UIFont systemFontOfSize:1].fontName; + _headerTitleFontName = [UIFont systemFontOfSize:1].fontName; + + _headerTitleColor = FSCalendarStandardTitleTextColor; + _headerDateFormat = @"MMMM yyyy"; + _headerMinimumDissolvedAlpha = 0.2; + _weekdayTextColor = FSCalendarStandardTitleTextColor; + _caseOptions = FSCalendarCaseOptionsHeaderUsesDefaultCase|FSCalendarCaseOptionsWeekdayUsesDefaultCase; + + _backgroundColors = [NSMutableDictionary dictionaryWithCapacity:5]; + _backgroundColors[@(FSCalendarCellStateNormal)] = [UIColor clearColor]; + _backgroundColors[@(FSCalendarCellStateSelected)] = FSCalendarStandardSelectionColor; + _backgroundColors[@(FSCalendarCellStateDisabled)] = [UIColor clearColor]; + _backgroundColors[@(FSCalendarCellStatePlaceholder)] = [UIColor clearColor]; + _backgroundColors[@(FSCalendarCellStateToday)] = FSCalendarStandardTodayColor; + + _titleColors = [NSMutableDictionary dictionaryWithCapacity:5]; + _titleColors[@(FSCalendarCellStateNormal)] = [UIColor blackColor]; + _titleColors[@(FSCalendarCellStateSelected)] = [UIColor whiteColor]; + _titleColors[@(FSCalendarCellStateDisabled)] = [UIColor grayColor]; + _titleColors[@(FSCalendarCellStatePlaceholder)] = [UIColor lightGrayColor]; + _titleColors[@(FSCalendarCellStateToday)] = [UIColor whiteColor]; + + _subtitleColors = [NSMutableDictionary dictionaryWithCapacity:5]; + _subtitleColors[@(FSCalendarCellStateNormal)] = [UIColor darkGrayColor]; + _subtitleColors[@(FSCalendarCellStateSelected)] = [UIColor whiteColor]; + _subtitleColors[@(FSCalendarCellStateDisabled)] = [UIColor lightGrayColor]; + _subtitleColors[@(FSCalendarCellStatePlaceholder)] = [UIColor lightGrayColor]; + _subtitleColors[@(FSCalendarCellStateToday)] = [UIColor whiteColor]; + + _borderColors[@(FSCalendarCellStateSelected)] = [UIColor clearColor]; + _borderColors[@(FSCalendarCellStateNormal)] = [UIColor clearColor]; + + _cellShape = FSCalendarCellShapeCircle; + _eventColor = FSCalendarStandardEventDotColor; + + _borderColors = [NSMutableDictionary dictionaryWithCapacity:2]; + + } + return self; +} + +- (void)setTitleFont:(UIFont *)titleFont +{ + BOOL needsInvalidating = NO; + if (![_titleFontName isEqualToString:titleFont.fontName]) { + _titleFontName = titleFont.fontName; + needsInvalidating = YES; + } + if (_titleFontSize != titleFont.pointSize) { + _titleFontSize = titleFont.pointSize; + needsInvalidating = YES; + } + if (needsInvalidating) { + [self invalidateTitleFont]; + } +} + +- (UIFont *)titleFont +{ + return [UIFont fontWithName:_titleFontName size:_titleFontSize]; +} + +- (void)setSubtitleFont:(UIFont *)subtitleFont +{ + BOOL needsInvalidating = NO; + if (![_subtitleFontName isEqualToString:subtitleFont.fontName]) { + _subtitleFontName = subtitleFont.fontName; + needsInvalidating = YES; + } + if (_subtitleFontSize != subtitleFont.pointSize) { + _subtitleFontSize = subtitleFont.pointSize; + needsInvalidating = YES; + } + if (needsInvalidating) { + [self invalidateSubtitleFont]; + } +} + +- (UIFont *)subtitleFont +{ + return [UIFont fontWithName:_subtitleFontName size:_subtitleFontSize]; +} + +- (void)setWeekdayFont:(UIFont *)weekdayFont +{ + BOOL needsInvalidating = NO; + if (![_weekdayFontName isEqualToString:weekdayFont.fontName]) { + _weekdayFontName = weekdayFont.fontName; + needsInvalidating = YES; + } + if (_weekdayFontSize != weekdayFont.pointSize) { + _weekdayFontSize = weekdayFont.pointSize; + needsInvalidating = YES; + } + if (needsInvalidating) { + [self invalidateWeekdayFont]; + } +} + +- (UIFont *)weekdayFont +{ + return [UIFont fontWithName:_weekdayFontName size:_weekdayFontSize]; +} + +- (void)setHeaderTitleFont:(UIFont *)headerTitleFont +{ + BOOL needsInvalidating = NO; + if (![_headerTitleFontName isEqualToString:headerTitleFont.fontName]) { + _headerTitleFontName = headerTitleFont.fontName; + needsInvalidating = YES; + } + if (_headerTitleFontSize != headerTitleFont.pointSize) { + _headerTitleFontSize = headerTitleFont.pointSize; + needsInvalidating = YES; + } + if (needsInvalidating) { + [self invalidateHeaderFont]; + } +} + +- (void)setTitleVerticalOffset:(CGFloat)titleVerticalOffset +{ + if (_titleVerticalOffset != titleVerticalOffset) { + _titleVerticalOffset = titleVerticalOffset; + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:@selector(setNeedsLayout)]; + } +} + +- (void)setSubtitleVerticalOffset:(CGFloat)subtitleVerticalOffset +{ + if (_subtitleVerticalOffset != subtitleVerticalOffset) { + _subtitleVerticalOffset = subtitleVerticalOffset; + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:@selector(setNeedsLayout)]; + } +} + +- (UIFont *)headerTitleFont +{ + return [UIFont fontWithName:_headerTitleFontName size:_headerTitleFontSize]; +} + +- (void)setTitleDefaultColor:(UIColor *)color +{ + if (color) { + _titleColors[@(FSCalendarCellStateNormal)] = color; + } else { + [_titleColors removeObjectForKey:@(FSCalendarCellStateNormal)]; + } + [self invalidateTitleTextColor]; +} + +- (UIColor *)titleDefaultColor +{ + return _titleColors[@(FSCalendarCellStateNormal)]; +} + +- (void)setTitleSelectionColor:(UIColor *)color +{ + if (color) { + _titleColors[@(FSCalendarCellStateSelected)] = color; + } else { + [_titleColors removeObjectForKey:@(FSCalendarCellStateSelected)]; + } + [self invalidateTitleTextColor]; +} + +- (UIColor *)titleSelectionColor +{ + return _titleColors[@(FSCalendarCellStateSelected)]; +} + +- (void)setTitleTodayColor:(UIColor *)color +{ + if (color) { + _titleColors[@(FSCalendarCellStateToday)] = color; + } else { + [_titleColors removeObjectForKey:@(FSCalendarCellStateToday)]; + } + [self invalidateTitleTextColor]; +} + +- (UIColor *)titleTodayColor +{ + return _titleColors[@(FSCalendarCellStateToday)]; +} + +- (void)setTitlePlaceholderColor:(UIColor *)color +{ + if (color) { + _titleColors[@(FSCalendarCellStatePlaceholder)] = color; + } else { + [_titleColors removeObjectForKey:@(FSCalendarCellStatePlaceholder)]; + } + [self invalidateTitleTextColor]; +} + +- (UIColor *)titlePlaceholderColor +{ + return _titleColors[@(FSCalendarCellStatePlaceholder)]; +} + +- (void)setTitleWeekendColor:(UIColor *)color +{ + if (color) { + _titleColors[@(FSCalendarCellStateWeekend)] = color; + } else { + [_titleColors removeObjectForKey:@(FSCalendarCellStateWeekend)]; + } + [self invalidateTitleTextColor]; +} + +- (UIColor *)titleWeekendColor +{ + return _titleColors[@(FSCalendarCellStateWeekend)]; +} + +- (void)setSubtitleDefaultColor:(UIColor *)color +{ + if (color) { + _subtitleColors[@(FSCalendarCellStateNormal)] = color; + } else { + [_subtitleColors removeObjectForKey:@(FSCalendarCellStateNormal)]; + } + [self invalidateSubtitleTextColor]; +} + +-(UIColor *)subtitleDefaultColor +{ + return _subtitleColors[@(FSCalendarCellStateNormal)]; +} + +- (void)setSubtitleSelectionColor:(UIColor *)color +{ + if (color) { + _subtitleColors[@(FSCalendarCellStateSelected)] = color; + } else { + [_subtitleColors removeObjectForKey:@(FSCalendarCellStateSelected)]; + } + [self invalidateSubtitleTextColor]; +} + +- (UIColor *)subtitleSelectionColor +{ + return _subtitleColors[@(FSCalendarCellStateSelected)]; +} + +- (void)setSubtitleTodayColor:(UIColor *)color +{ + if (color) { + _subtitleColors[@(FSCalendarCellStateToday)] = color; + } else { + [_subtitleColors removeObjectForKey:@(FSCalendarCellStateToday)]; + } + [self invalidateSubtitleTextColor]; +} + +- (UIColor *)subtitleTodayColor +{ + return _subtitleColors[@(FSCalendarCellStateToday)]; +} + +- (void)setSubtitlePlaceholderColor:(UIColor *)color +{ + if (color) { + _subtitleColors[@(FSCalendarCellStatePlaceholder)] = color; + } else { + [_subtitleColors removeObjectForKey:@(FSCalendarCellStatePlaceholder)]; + } + [self invalidateSubtitleTextColor]; +} + +- (UIColor *)subtitlePlaceholderColor +{ + return _subtitleColors[@(FSCalendarCellStatePlaceholder)]; +} + +- (void)setSubtitleWeekendColor:(UIColor *)color +{ + if (color) { + _subtitleColors[@(FSCalendarCellStateWeekend)] = color; + } else { + [_subtitleColors removeObjectForKey:@(FSCalendarCellStateWeekend)]; + } + [self invalidateSubtitleTextColor]; +} + +- (UIColor *)subtitleWeekendColor +{ + return _subtitleColors[@(FSCalendarCellStateWeekend)]; +} + +- (void)setSelectionColor:(UIColor *)color +{ + if (color) { + _backgroundColors[@(FSCalendarCellStateSelected)] = color; + } else { + [_backgroundColors removeObjectForKey:@(FSCalendarCellStateSelected)]; + } + [self invalidateBackgroundColors]; +} + +- (UIColor *)selectionColor +{ + return _backgroundColors[@(FSCalendarCellStateSelected)]; +} + +- (void)setTodayColor:(UIColor *)todayColor +{ + if (todayColor) { + _backgroundColors[@(FSCalendarCellStateToday)] = todayColor; + } else { + [_backgroundColors removeObjectForKey:@(FSCalendarCellStateToday)]; + } + [self invalidateBackgroundColors]; +} + +- (UIColor *)todayColor +{ + return _backgroundColors[@(FSCalendarCellStateToday)]; +} + +- (void)setTodaySelectionColor:(UIColor *)todaySelectionColor +{ + if (todaySelectionColor) { + _backgroundColors[@(FSCalendarCellStateToday|FSCalendarCellStateSelected)] = todaySelectionColor; + } else { + [_backgroundColors removeObjectForKey:@(FSCalendarCellStateToday|FSCalendarCellStateSelected)]; + } + [self invalidateBackgroundColors]; +} + +- (UIColor *)todaySelectionColor +{ + return _backgroundColors[@(FSCalendarCellStateToday|FSCalendarCellStateSelected)]; +} + +- (void)setEventColor:(UIColor *)eventColor +{ + if (![_eventColor isEqual:eventColor]) { + _eventColor = eventColor; + [self invalidateEventColors]; + } +} + +- (void)setBorderDefaultColor:(UIColor *)color +{ + if (color) { + _borderColors[@(FSCalendarCellStateNormal)] = color; + } else { + [_borderColors removeObjectForKey:@(FSCalendarCellStateNormal)]; + } + [self invalidateBorderColors]; +} + +- (UIColor *)borderDefaultColor +{ + return _borderColors[@(FSCalendarCellStateNormal)]; +} + +- (void)setBorderSelectionColor:(UIColor *)color +{ + if (color) { + _borderColors[@(FSCalendarCellStateSelected)] = color; + } else { + [_borderColors removeObjectForKey:@(FSCalendarCellStateSelected)]; + } + [self invalidateBorderColors]; +} + +- (UIColor *)borderSelectionColor +{ + return _borderColors[@(FSCalendarCellStateSelected)]; +} + +- (void)setCellShape:(FSCalendarCellShape)cellShape +{ + if (_cellShape != cellShape) { + _cellShape = cellShape; + [self invalidateCellShapes]; + } +} + +- (void)setWeekdayTextColor:(UIColor *)weekdayTextColor +{ + if (![_weekdayTextColor isEqual:weekdayTextColor]) { + _weekdayTextColor = weekdayTextColor; + [self invalidateWeekdayTextColor]; + } +} + +- (void)setHeaderTitleColor:(UIColor *)color +{ + if (![_headerTitleColor isEqual:color]) { + _headerTitleColor = color; + [self invalidateHeaderTextColor]; + } +} + +- (void)setHeaderMinimumDissolvedAlpha:(CGFloat)headerMinimumDissolvedAlpha +{ + if (_headerMinimumDissolvedAlpha != headerMinimumDissolvedAlpha) { + _headerMinimumDissolvedAlpha = headerMinimumDissolvedAlpha; + [_calendar.header.collectionView.visibleCells makeObjectsPerformSelector:@selector(setNeedsLayout)]; + [_calendar.visibleStickyHeaders makeObjectsPerformSelector:@selector(setNeedsLayout)]; + } +} + +- (void)setHeaderDateFormat:(NSString *)headerDateFormat +{ + if (![_headerDateFormat isEqual:headerDateFormat]) { + _headerDateFormat = headerDateFormat; + [_calendar invalidateHeaders]; + } +} + +- (void)setAdjustsFontSizeToFitContentSize:(BOOL)adjustsFontSizeToFitContentSize +{ + if (_adjustsFontSizeToFitContentSize != adjustsFontSizeToFitContentSize) { + _adjustsFontSizeToFitContentSize = adjustsFontSizeToFitContentSize; + if (adjustsFontSizeToFitContentSize) { + [self invalidateFonts]; + } + } +} + +- (UIFont *)preferredTitleFont +{ + return [UIFont fontWithName:_titleFontName size:_adjustsFontSizeToFitContentSize?_preferredTitleFontSize:_titleFontSize]; +} + +- (UIFont *)preferredSubtitleFont +{ + return [UIFont fontWithName:_subtitleFontName size:_adjustsFontSizeToFitContentSize?_preferredSubtitleFontSize:_subtitleFontSize]; +} + +- (UIFont *)preferredWeekdayFont +{ + return [UIFont fontWithName:_weekdayFontName size:_adjustsFontSizeToFitContentSize?_preferredWeekdayFontSize:_weekdayFontSize]; +} + +- (UIFont *)preferredHeaderTitleFont +{ + return [UIFont fontWithName:_headerTitleFontName size:_adjustsFontSizeToFitContentSize?_preferredHeaderTitleFontSize:_headerTitleFontSize]; +} + +- (void)adjustTitleIfNecessary +{ + if (!self.calendar.floatingMode) { + if (_adjustsFontSizeToFitContentSize) { + CGFloat factor = (_calendar.scope==FSCalendarScopeMonth) ? 6 : 1.1; + _preferredTitleFontSize = _calendar.collectionView.fs_height/3/factor; + _preferredTitleFontSize -= (_preferredTitleFontSize-FSCalendarStandardTitleTextSize)*0.5; + _preferredSubtitleFontSize = _calendar.collectionView.fs_height/4.5/factor; + _preferredSubtitleFontSize -= (_preferredSubtitleFontSize-FSCalendarStandardSubtitleTextSize)*0.75; + _preferredHeaderTitleFontSize = _preferredTitleFontSize * 1.25; + _preferredWeekdayFontSize = _preferredTitleFontSize; + + } + } else { + _preferredHeaderTitleFontSize = 20; + if (FSCalendarDeviceIsIPad) { + _preferredHeaderTitleFontSize = FSCalendarStandardHeaderTextSize * 1.5; + _preferredTitleFontSize = FSCalendarStandardTitleTextSize * 1.3; + _preferredSubtitleFontSize = FSCalendarStandardSubtitleTextSize * 1.15; + _preferredWeekdayFontSize = _preferredTitleFontSize; + } + } + + // reload appearance + [self invalidateFonts]; +} + +- (void)setCaseOptions:(FSCalendarCaseOptions)caseOptions +{ + if (_caseOptions != caseOptions) { + _caseOptions = caseOptions; + [_calendar invalidateWeekdaySymbols]; + [_calendar invalidateHeaders]; + } +} + +- (void)invalidateAppearance +{ + [self invalidateFonts]; + [self invalidateTextColors]; + [self invalidateBorderColors]; + [self invalidateBackgroundColors]; + /* + [_calendar.collectionView.visibleCells enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + [_calendar invalidateAppearanceForCell:obj]; + }]; + [_calendar.header.collectionView.visibleCells makeObjectsPerformSelector:@selector(setNeedsLayout)]; + [_calendar.visibleStickyHeaders makeObjectsPerformSelector:@selector(setNeedsLayout)]; + */ +} + +- (void)invalidateFonts +{ + [self invalidateTitleFont]; + [self invalidateSubtitleFont]; + [self invalidateWeekdayFont]; + [self invalidateHeaderFont]; +} + +- (void)invalidateTextColors +{ + [self invalidateTitleTextColor]; + [self invalidateSubtitleTextColor]; + [self invalidateWeekdayTextColor]; + [self invalidateHeaderTextColor]; +} + +- (void)invalidateBorderColors +{ + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateBackgroundColors +{ + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateEventColors +{ + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateCellShapes +{ + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateTitleFont +{ + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateSubtitleFont +{ + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateTitleTextColor +{ + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateSubtitleTextColor +{ + [_calendar.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateWeekdayFont +{ + [_calendar invalidateWeekdayFont]; + [_calendar.visibleStickyHeaders makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateWeekdayTextColor +{ + [_calendar invalidateWeekdayTextColor]; + [_calendar.visibleStickyHeaders makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateHeaderFont +{ + [_calendar.header.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; + [_calendar.visibleStickyHeaders makeObjectsPerformSelector:_cmd]; +} + +- (void)invalidateHeaderTextColor +{ + [_calendar.header.collectionView.visibleCells makeObjectsPerformSelector:_cmd]; + [_calendar.visibleStickyHeaders makeObjectsPerformSelector:_cmd]; +} + +@end + + +@implementation FSCalendarAppearance (Deprecated) + +- (void)setCellStyle:(FSCalendarCellStyle)cellStyle +{ + self.cellShape = (FSCalendarCellShape)cellStyle; +} + +- (FSCalendarCellStyle)cellStyle +{ + return (FSCalendarCellStyle)self.cellShape; +} + +- (void)setUseVeryShortWeekdaySymbols:(BOOL)useVeryShortWeekdaySymbols +{ + _caseOptions &= 15; + self.caseOptions |= (useVeryShortWeekdaySymbols*FSCalendarCaseOptionsWeekdayUsesSingleUpperCase); +} + +- (BOOL)useVeryShortWeekdaySymbols +{ + return (_caseOptions & (15<<4) ) == FSCalendarCaseOptionsWeekdayUsesSingleUpperCase; +} + +- (void)setAutoAdjustTitleSize:(BOOL)autoAdjustTitleSize +{ + self.adjustsFontSizeToFitContentSize = autoAdjustTitleSize; +} + +- (BOOL)autoAdjustTitleSize +{ + return self.adjustsFontSizeToFitContentSize; +} + +- (void)setTitleTextSize:(CGFloat)titleTextSize +{ + self.titleFont = [UIFont fontWithName:_titleFontName size:titleTextSize]; +} + +- (CGFloat)titleTextSize +{ + return _titleFontSize; +} + +- (void)setSubtitleTextSize:(CGFloat)subtitleTextSize +{ + self.subtitleFont = [UIFont fontWithName:_subtitleFontName size:subtitleTextSize]; +} + +- (CGFloat)subtitleTextSize +{ + return _subtitleFontSize; +} + +- (void)setWeekdayTextSize:(CGFloat)weekdayTextSize +{ + self.weekdayFont = [UIFont fontWithName:_weekdayFontName size:weekdayTextSize]; +} + +- (CGFloat)weekdayTextSize +{ + return _weekdayFontSize; +} + +- (void)setHeaderTitleTextSize:(CGFloat)headerTitleTextSize +{ + self.headerTitleFont = [UIFont fontWithName:_headerTitleFontName size:headerTitleTextSize]; +} + +- (CGFloat)headerTitleTextSize +{ + return _headerTitleFontSize; +} + +- (void)setAdjustsFontSizeToFitCellSize:(BOOL)adjustsFontSizeToFitCellSize +{ + self.adjustsFontSizeToFitContentSize = adjustsFontSizeToFitCellSize; +} + +- (BOOL)adjustsFontSizeToFitCellSize +{ + return self.adjustsFontSizeToFitContentSize; +} + +@end + + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCell.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCell.h new file mode 100644 index 0000000..2e734dc --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCell.h @@ -0,0 +1,63 @@ +// +// FSCalendarCell.h +// Pods +// +// Created by Wenchao Ding on 12/3/15. +// +// + +#import +#import "FSCalendar.h" +#import "FSCalendarEventIndicator.h" + +@interface FSCalendarCell : UICollectionViewCell + +@property (weak, nonatomic) FSCalendar *calendar; +@property (weak, nonatomic) FSCalendarAppearance *appearance; + +@property (weak, nonatomic) UILabel *titleLabel; +@property (weak, nonatomic) UILabel *subtitleLabel; +@property (weak, nonatomic) UIImageView *imageView; + +@property (weak, nonatomic) CAShapeLayer *backgroundLayer; +@property (weak, nonatomic) FSCalendarEventIndicator *eventIndicator; + +@property (strong, nonatomic) NSDate *date; +@property (strong, nonatomic) NSString *subtitle; +@property (strong, nonatomic) UIImage *image; + +@property (assign, nonatomic) BOOL needsAdjustingViewFrame; +@property (assign, nonatomic) NSInteger numberOfEvents; + +@property (assign, nonatomic) BOOL dateIsPlaceholder; +@property (assign, nonatomic) BOOL dateIsSelected; +@property (assign, nonatomic) BOOL dateIsToday; + +@property (readonly, nonatomic) BOOL weekend; + +@property (strong, nonatomic) UIColor *preferredSelectionColor; +@property (strong, nonatomic) UIColor *preferredTitleDefaultColor; +@property (strong, nonatomic) UIColor *preferredTitleSelectionColor; +@property (strong, nonatomic) UIColor *preferredSubtitleDefaultColor; +@property (strong, nonatomic) UIColor *preferredSubtitleSelectionColor; +@property (strong, nonatomic) UIColor *preferredBorderDefaultColor; +@property (strong, nonatomic) UIColor *preferredBorderSelectionColor; +@property (strong, nonatomic) id preferredEventColor; +@property (assign, nonatomic) FSCalendarCellShape preferredCellShape; + +- (void)invalidateTitleFont; +- (void)invalidateSubtitleFont; +- (void)invalidateTitleTextColor; +- (void)invalidateSubtitleTextColor; + +- (void)invalidateBorderColors; +- (void)invalidateBackgroundColors; +- (void)invalidateEventColors; +- (void)invalidateCellShapes; + +- (void)invalidateImage; + +- (UIColor *)colorForCurrentStateInDictionary:(NSDictionary *)dictionary; +- (void)performSelecting; + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCell.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCell.m new file mode 100644 index 0000000..1211d91 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCell.m @@ -0,0 +1,377 @@ +// +// FSCalendarCell.m +// Pods +// +// Created by Wenchao Ding on 12/3/15. +// +// + +#import "FSCalendarCell.h" +#import "FSCalendar.h" +#import "UIView+FSExtension.h" +#import "FSCalendarDynamicHeader.h" +#import "FSCalendarConstance.h" + +@interface FSCalendarCell () + +@property (readonly, nonatomic) UIColor *colorForBackgroundLayer; +@property (readonly, nonatomic) UIColor *colorForTitleLabel; +@property (readonly, nonatomic) UIColor *colorForSubtitleLabel; +@property (readonly, nonatomic) UIColor *colorForCellBorder; +@property (readonly, nonatomic) FSCalendarCellShape cellShape; + +@end + +@implementation FSCalendarCell + +#pragma mark - Life cycle + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + + _needsAdjustingViewFrame = YES; + + UILabel *label; + CAShapeLayer *shapeLayer; + UIImageView *imageView; + FSCalendarEventIndicator *eventIndicator; + + label = [[UILabel alloc] initWithFrame:CGRectZero]; + label.textAlignment = NSTextAlignmentCenter; + label.textColor = [UIColor blackColor]; + [self.contentView addSubview:label]; + self.titleLabel = label; + + label = [[UILabel alloc] initWithFrame:CGRectZero]; + label.textAlignment = NSTextAlignmentCenter; + label.textColor = [UIColor lightGrayColor]; + [self.contentView addSubview:label]; + self.subtitleLabel = label; + + shapeLayer = [CAShapeLayer layer]; + shapeLayer.backgroundColor = [UIColor clearColor].CGColor; + shapeLayer.hidden = YES; + [self.contentView.layer insertSublayer:shapeLayer below:_titleLabel.layer]; + self.backgroundLayer = shapeLayer; + + eventIndicator = [[FSCalendarEventIndicator alloc] initWithFrame:CGRectZero]; + eventIndicator.backgroundColor = [UIColor clearColor]; + eventIndicator.hidden = YES; + [self.contentView addSubview:eventIndicator]; + self.eventIndicator = eventIndicator; + + imageView = [[UIImageView alloc] initWithFrame:CGRectZero]; + imageView.contentMode = UIViewContentModeBottom|UIViewContentModeCenter; + [self.contentView addSubview:imageView]; + self.imageView = imageView; + + self.clipsToBounds = NO; + self.contentView.clipsToBounds = NO; + + } + return self; +} + +- (void)setBounds:(CGRect)bounds +{ + [super setBounds:bounds]; + CGFloat titleHeight = self.bounds.size.height*5.0/6.0; + CGFloat diameter = MIN(self.bounds.size.height*5.0/6.0,self.bounds.size.width); + diameter = diameter > FSCalendarStandardCellDiameter ? (diameter - (diameter-FSCalendarStandardCellDiameter)*0.5) : diameter; + _backgroundLayer.frame = CGRectMake((self.bounds.size.width-diameter)/2, + (titleHeight-diameter)/2, + diameter, + diameter); + _backgroundLayer.borderWidth = 1.0; + _backgroundLayer.borderColor = [UIColor clearColor].CGColor; + + CGFloat eventSize = _backgroundLayer.frame.size.height/6.0; + _eventIndicator.frame = CGRectMake(0, CGRectGetMaxY(_backgroundLayer.frame)+eventSize*0.17, bounds.size.width, eventSize*0.83); + _imageView.frame = self.contentView.bounds; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + [self configureCell]; +} + +- (void)prepareForReuse +{ + [super prepareForReuse]; + [CATransaction setDisableActions:YES]; + _backgroundLayer.hidden = YES; + [self.contentView.layer removeAnimationForKey:@"opacity"]; +} + +#pragma mark - Public + +- (void)performSelecting +{ + _backgroundLayer.hidden = NO; + +#define kAnimationDuration FSCalendarDefaultBounceAnimationDuration + + CAAnimationGroup *group = [CAAnimationGroup animation]; + CABasicAnimation *zoomOut = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; + zoomOut.fromValue = @0.3; + zoomOut.toValue = @1.2; + zoomOut.duration = kAnimationDuration/4*3; + CABasicAnimation *zoomIn = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; + zoomIn.fromValue = @1.2; + zoomIn.toValue = @1.0; + zoomIn.beginTime = kAnimationDuration/4*3; + zoomIn.duration = kAnimationDuration/4; + group.duration = kAnimationDuration; + group.animations = @[zoomOut, zoomIn]; + [_backgroundLayer addAnimation:group forKey:@"bounce"]; + [self configureCell]; + +#undef kAnimationDuration + +} + +#pragma mark - Private + +- (void)configureCell +{ + self.contentView.hidden = self.dateIsPlaceholder && !self.calendar.showsPlaceholders; + if (self.contentView.hidden) { + return; + } + _titleLabel.text = [NSString stringWithFormat:@"%@",@([_calendar dayOfDate:_date])]; + if (_subtitle) { + _subtitleLabel.text = _subtitle; + if (_subtitleLabel.hidden) { + _subtitleLabel.hidden = NO; + } + } else { + if (!_subtitleLabel.hidden) { + _subtitleLabel.hidden = YES; + } + } + if (_needsAdjustingViewFrame || CGSizeEqualToSize(_titleLabel.frame.size, CGSizeZero)) { + _needsAdjustingViewFrame = NO; + + if (_subtitle) { + CGFloat titleHeight = [@"1" sizeWithAttributes:@{NSFontAttributeName:_titleLabel.font}].height; + CGFloat subtitleHeight = [@"1" sizeWithAttributes:@{NSFontAttributeName:_subtitleLabel.font}].height; + + CGFloat height = titleHeight + subtitleHeight; + _titleLabel.frame = CGRectMake(0, + (self.contentView.fs_height*5.0/6.0-height)*0.5+_appearance.titleVerticalOffset, + self.fs_width, + titleHeight); + + _subtitleLabel.frame = CGRectMake(0, + _titleLabel.fs_bottom - (_titleLabel.fs_height-_titleLabel.font.pointSize)+_appearance.subtitleVerticalOffset, + self.fs_width, + subtitleHeight); + } else { + _titleLabel.frame = CGRectMake(0, _appearance.titleVerticalOffset, self.contentView.fs_width, floor(self.contentView.fs_height*5.0/6.0)); + } + + } + + UIColor *textColor = self.colorForTitleLabel; + if (![textColor isEqual:_titleLabel.textColor]) { + _titleLabel.textColor = textColor; + } + if (_subtitle) { + textColor = self.colorForSubtitleLabel; + if (![textColor isEqual:_subtitleLabel.textColor]) { + _subtitleLabel.textColor = textColor; + } + } + + UIColor *borderColor = self.colorForCellBorder; + BOOL shouldHiddenBackgroundLayer = !self.selected && !self.dateIsToday && !self.dateIsSelected && !borderColor; + + if (_backgroundLayer.hidden != shouldHiddenBackgroundLayer) { + _backgroundLayer.hidden = shouldHiddenBackgroundLayer; + } + if (!shouldHiddenBackgroundLayer) { + + CGPathRef path = self.cellShape == FSCalendarCellShapeCircle ? + [UIBezierPath bezierPathWithOvalInRect:_backgroundLayer.bounds].CGPath : + [UIBezierPath bezierPathWithRect:_backgroundLayer.bounds].CGPath; + if (!CGPathEqualToPath(_backgroundLayer.path,path)) { + _backgroundLayer.path = path; + } + + CGColorRef backgroundColor = self.colorForBackgroundLayer.CGColor; + if (!CGColorEqualToColor(_backgroundLayer.fillColor, backgroundColor)) { + _backgroundLayer.fillColor = backgroundColor; + } + + CGColorRef borderColor = self.colorForCellBorder.CGColor; + if (!CGColorEqualToColor(_backgroundLayer.strokeColor, borderColor)) { + _backgroundLayer.strokeColor = borderColor; + } + + } + + if (![_image isEqual:_imageView.image]) { + [self invalidateImage]; + } + + if (_eventIndicator.hidden == (_numberOfEvents > 0)) { + _eventIndicator.hidden = !_numberOfEvents; + } + _eventIndicator.numberOfEvents = self.numberOfEvents; + _eventIndicator.color = self.preferredEventColor ?: _appearance.eventColor; +} + +- (BOOL)isWeekend +{ + return _date && ([_calendar weekdayOfDate:_date] == 1 || [_calendar weekdayOfDate:_date] == 7); +} + +- (UIColor *)colorForCurrentStateInDictionary:(NSDictionary *)dictionary +{ + if (self.isSelected || self.dateIsSelected) { + if (self.dateIsToday) { + return dictionary[@(FSCalendarCellStateSelected|FSCalendarCellStateToday)] ?: dictionary[@(FSCalendarCellStateSelected)]; + } + return dictionary[@(FSCalendarCellStateSelected)]; + } + if (self.dateIsToday && [[dictionary allKeys] containsObject:@(FSCalendarCellStateToday)]) { + return dictionary[@(FSCalendarCellStateToday)]; + } + if (self.dateIsPlaceholder && [[dictionary allKeys] containsObject:@(FSCalendarCellStatePlaceholder)]) { + return dictionary[@(FSCalendarCellStatePlaceholder)]; + } + if (self.isWeekend && [[dictionary allKeys] containsObject:@(FSCalendarCellStateWeekend)]) { + return dictionary[@(FSCalendarCellStateWeekend)]; + } + return dictionary[@(FSCalendarCellStateNormal)]; +} + +- (void)invalidateTitleFont +{ + _titleLabel.font = self.appearance.preferredTitleFont; +} + +- (void)invalidateTitleTextColor +{ + _titleLabel.textColor = self.colorForTitleLabel; +} + +- (void)invalidateSubtitleFont +{ + _subtitleLabel.font = self.appearance.preferredSubtitleFont; +} + +- (void)invalidateSubtitleTextColor +{ + _subtitleLabel.textColor = self.colorForSubtitleLabel; +} + +- (void)invalidateBorderColors +{ + _backgroundLayer.strokeColor = self.colorForCellBorder.CGColor; +} + +- (void)invalidateBackgroundColors +{ + _backgroundLayer.fillColor = self.colorForBackgroundLayer.CGColor; +} + +- (void)invalidateEventColors +{ + _eventIndicator.color = self.preferredEventColor ?: _appearance.eventColor; +} + +- (void)invalidateCellShapes +{ + CGPathRef path = self.cellShape == FSCalendarCellShapeCircle ? + [UIBezierPath bezierPathWithOvalInRect:_backgroundLayer.bounds].CGPath : + [UIBezierPath bezierPathWithRect:_backgroundLayer.bounds].CGPath; + _backgroundLayer.path = path; +} + +- (void)invalidateImage +{ + _imageView.image = _image; + _imageView.hidden = !_image; +} + +#pragma mark - Properties + +- (UIColor *)colorForBackgroundLayer +{ + if (self.dateIsSelected || self.isSelected) { + return self.preferredSelectionColor ?: [self colorForCurrentStateInDictionary:_appearance.backgroundColors]; + } + return [self colorForCurrentStateInDictionary:_appearance.backgroundColors]; +} + +- (UIColor *)colorForTitleLabel +{ + if (self.dateIsSelected || self.isSelected) { + return self.preferredTitleSelectionColor ?: [self colorForCurrentStateInDictionary:_appearance.titleColors]; + } + return self.preferredTitleDefaultColor ?: [self colorForCurrentStateInDictionary:_appearance.titleColors]; +} + +- (UIColor *)colorForSubtitleLabel +{ + if (self.dateIsSelected || self.isSelected) { + return self.preferredSubtitleSelectionColor ?: [self colorForCurrentStateInDictionary:_appearance.subtitleColors]; + } + return self.preferredSubtitleDefaultColor ?: [self colorForCurrentStateInDictionary:_appearance.subtitleColors]; +} + +- (UIColor *)colorForCellBorder +{ + if (self.dateIsSelected || self.isSelected) { + return _preferredBorderSelectionColor ?: _appearance.borderSelectionColor; + } + return _preferredBorderDefaultColor ?: _appearance.borderDefaultColor; +} + +- (FSCalendarCellShape)cellShape +{ + return _preferredCellShape ?: _appearance.cellShape; +} + +- (void)setCalendar:(FSCalendar *)calendar +{ + if (![_calendar isEqual:calendar]) { + _calendar = calendar; + } + if (![_appearance isEqual:calendar.appearance]) { + _appearance = calendar.appearance; + [self invalidateTitleFont]; + [self invalidateSubtitleFont]; + [self invalidateTitleTextColor]; + [self invalidateSubtitleTextColor]; + [self invalidateEventColors]; + } +} + +- (void)setSubtitle:(NSString *)subtitle +{ + if (![_subtitle isEqualToString:subtitle]) { + _needsAdjustingViewFrame = !(_subtitle.length && subtitle.length); + _subtitle = subtitle; + if (_needsAdjustingViewFrame) { + [self setNeedsLayout]; + } + } +} + +- (void)setNeedsAdjustingViewFrame:(BOOL)needsAdjustingViewFrame +{ + if (_needsAdjustingViewFrame != needsAdjustingViewFrame) { + _needsAdjustingViewFrame = needsAdjustingViewFrame; + _eventIndicator.needsAdjustingViewFrame = needsAdjustingViewFrame; + } +} + +@end + + + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCollectionView.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCollectionView.h new file mode 100644 index 0000000..1d0f577 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCollectionView.h @@ -0,0 +1,13 @@ +// +// FSCalendarCollectionView.h +// FSCalendar +// +// Created by Wenchao Ding on 10/25/15. +// Copyright (c) 2015 wenchaoios. All rights reserved. +// + +#import + +@interface FSCalendarCollectionView : UICollectionView + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCollectionView.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCollectionView.m new file mode 100644 index 0000000..1b450fd --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarCollectionView.m @@ -0,0 +1,62 @@ +// +// FSCalendarCollectionView.m +// FSCalendar +// +// Created by Wenchao Ding on 10/25/15. +// Copyright (c) 2015 wenchaoios. All rights reserved. +// + +#import "FSCalendarCollectionView.h" +#import "FSCalendarCell.h" + +@interface FSCalendarCollectionView () + +- (void)initialize; + +@end + +@implementation FSCalendarCollectionView + +@synthesize scrollsToTop = _scrollsToTop, contentInset = _contentInset; + +- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout +{ + self = [super initWithFrame:frame collectionViewLayout:layout]; + if (self) { + [self initialize]; + } + return self; +} + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self initialize]; + } + return self; +} + +- (void)initialize +{ + self.scrollsToTop = NO; + self.contentInset = UIEdgeInsetsZero; +#ifdef __IPHONE_9_0 + if ([self respondsToSelector:@selector(setSemanticContentAttribute:)]) { + self.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; + } +#endif +} + +- (void)setContentInset:(UIEdgeInsets)contentInset +{ + [super setContentInset:UIEdgeInsetsZero]; +} + +- (void)setScrollsToTop:(BOOL)scrollsToTop +{ + [super setScrollsToTop:NO]; +} + +@end + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarConstance.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarConstance.h new file mode 100644 index 0000000..3adc915 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarConstance.h @@ -0,0 +1,61 @@ +// +// FSCalendarConstane.h +// FSCalendar +// +// Created by dingwenchao on 8/28/15. +// Copyright © 2016 Wenchao Ding. All rights reserved. +// +// https://github.com/WenchaoD +// + +#import +#import + +#pragma mark - Constance + +UIKIT_EXTERN CGFloat const FSCalendarStandardHeaderHeight; +UIKIT_EXTERN CGFloat const FSCalendarStandardWeekdayHeight; +UIKIT_EXTERN CGFloat const FSCalendarStandardMonthlyPageHeight; +UIKIT_EXTERN CGFloat const FSCalendarStandardWeeklyPageHeight; +UIKIT_EXTERN CGFloat const FSCalendarStandardCellDiameter; +UIKIT_EXTERN CGFloat const FSCalendarAutomaticDimension; +UIKIT_EXTERN CGFloat const FSCalendarDefaultBounceAnimationDuration; +UIKIT_EXTERN CGFloat const FSCalendarStandardRowHeight; +UIKIT_EXTERN CGFloat const FSCalendarStandardTitleTextSize; +UIKIT_EXTERN CGFloat const FSCalendarStandardSubtitleTextSize; +UIKIT_EXTERN CGFloat const FSCalendarStandardWeekdayTextSize; +UIKIT_EXTERN CGFloat const FSCalendarStandardHeaderTextSize; +UIKIT_EXTERN CGFloat const FSCalendarMaximumEventDotDiameter; + +UIKIT_EXTERN NSInteger const FSCalendarDefaultHourComponent; + +#define FSCalendarDeviceIsIPad [[UIDevice currentDevice].model hasPrefix:@"iPad"] + +#define FSCalendarStandardSelectionColor FSColorRGBA(31,119,219,1.0) +#define FSCalendarStandardTodayColor FSColorRGBA(198,51,42 ,1.0) +#define FSCalendarStandardTitleTextColor FSColorRGBA(14,69,221 ,1.0) +#define FSCalendarStandardEventDotColor FSColorRGBA(31,119,219,0.75) + +#define FSColorRGBA(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a] + +#if CGFLOAT_IS_DOUBLE +#define FSCalendarFloor(c) floor(c) +#else +#define FSCalendarFloor(c) floorf(c) +#endif + +#pragma mark - Deprecated + +#define FSCalendarDeprecated(instead) DEPRECATED_MSG_ATTRIBUTE(" Use " # instead " instead") + +FSCalendarDeprecated('FSCalendarCellShape') +typedef NS_ENUM(NSInteger, FSCalendarCellStyle) { + FSCalendarCellStyleCircle = 0, + FSCalendarCellStyleRectangle = 1 +}; + +FSCalendarDeprecated('FSCalendarScrollDirection') +typedef NS_ENUM(NSInteger, FSCalendarFlow) { + FSCalendarFlowVertical, + FSCalendarFlowHorizontal +}; diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarConstance.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarConstance.m new file mode 100644 index 0000000..3059465 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarConstance.m @@ -0,0 +1,27 @@ +// +// FSCalendarConstane.m +// FSCalendar +// +// Created by dingwenchao on 8/28/15. +// Copyright © 2016 Wenchao Ding. All rights reserved. +// +// https://github.com/WenchaoD +// + +#import "FSCalendarConstance.h" + +CGFloat const FSCalendarStandardHeaderHeight = 40; +CGFloat const FSCalendarStandardWeekdayHeight = 25; +CGFloat const FSCalendarStandardMonthlyPageHeight = 300.0; +CGFloat const FSCalendarStandardWeeklyPageHeight = 108+1/3.0; +CGFloat const FSCalendarStandardCellDiameter = 100/3.0; +CGFloat const FSCalendarAutomaticDimension = -1; +CGFloat const FSCalendarDefaultBounceAnimationDuration = 0.15; +CGFloat const FSCalendarStandardRowHeight = 38+1.0/3; +CGFloat const FSCalendarStandardTitleTextSize = 13.5; +CGFloat const FSCalendarStandardSubtitleTextSize = 10; +CGFloat const FSCalendarStandardWeekdayTextSize = 14; +CGFloat const FSCalendarStandardHeaderTextSize = 16.5; +CGFloat const FSCalendarMaximumEventDotDiameter = 4.8; + +NSInteger const FSCalendarDefaultHourComponent = 0; \ No newline at end of file diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarDynamicHeader.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarDynamicHeader.h new file mode 100644 index 0000000..f0caad0 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarDynamicHeader.h @@ -0,0 +1,88 @@ +// +// FSCalendarDynamicHeader.h +// Pods +// +// Created by DingWenchao on 6/29/15. +// +// 动感头文件,仅供框架内部使用。 +// Private header, don't use it. +// + +#import +#import + +#import "FSCalendar.h" +#import "FSCalendarCell.h" +#import "FSCalendarHeader.h" +#import "FSCalendarStickyHeader.h" + +@interface FSCalendar (Dynamic) + +@property (readonly, nonatomic) CAShapeLayer *maskLayer; +@property (readonly, nonatomic) FSCalendarHeader *header; +@property (readonly, nonatomic) UICollectionView *collectionView; +@property (readonly, nonatomic) UICollectionViewFlowLayout *collectionViewLayout; +@property (readonly, nonatomic) NSArray *weekdays; +@property (readonly, nonatomic) BOOL ibEditing; +@property (readonly, nonatomic) BOOL floatingMode; +@property (readonly, nonatomic) NSArray *visibleStickyHeaders; +@property (readonly, nonatomic) CGFloat preferredHeaderHeight; +@property (readonly, nonatomic) CGFloat preferredWeekdayHeight; +@property (readonly, nonatomic) CGFloat preferredRowHeight; +@property (readonly, nonatomic) UIView *bottomBorder; + +@property (readonly, nonatomic) NSCalendar *calendar; +@property (readonly, nonatomic) NSDateComponents *components; +@property (readonly, nonatomic) NSDateFormatter *formatter; + +@property (readonly, nonatomic) UIView *contentView; +@property (readonly, nonatomic) UIView *daysContainer; + +@property (assign, nonatomic) BOOL needsAdjustingMonthPosition; +@property (assign, nonatomic) BOOL needsAdjustingViewFrame; + +- (void)invalidateWeekdayFont; +- (void)invalidateWeekdayTextColor; + +- (void)invalidateHeaders; +- (void)invalidateWeekdaySymbols; +- (void)invalidateAppearanceForCell:(FSCalendarCell *)cell; + +- (NSDate *)dateForIndexPath:(NSIndexPath *)indexPath; +- (NSDate *)dateForIndexPath:(NSIndexPath *)indexPath scope:(FSCalendarScope)scope; +- (NSIndexPath *)indexPathForDate:(NSDate *)date; +- (NSIndexPath *)indexPathForDate:(NSDate *)date scope:(FSCalendarScope)scope; + +- (NSInteger)numberOfHeadPlaceholdersForMonth:(NSDate *)month; + +- (CGSize)sizeThatFits:(CGSize)size scope:(FSCalendarScope)scope; + +@end + +@interface FSCalendarAppearance (Dynamic) + +@property (readwrite, nonatomic) FSCalendar *calendar; + +@property (readonly, nonatomic) NSDictionary *backgroundColors; +@property (readonly, nonatomic) NSDictionary *titleColors; +@property (readonly, nonatomic) NSDictionary *subtitleColors; +@property (readonly, nonatomic) NSDictionary *borderColors; + +@property (readonly, nonatomic) UIFont *preferredTitleFont; +@property (readonly, nonatomic) UIFont *preferredSubtitleFont; +@property (readonly, nonatomic) UIFont *preferredWeekdayFont; +@property (readonly, nonatomic) UIFont *preferredHeaderTitleFont; + +- (void)adjustTitleIfNecessary; +- (void)invalidateFonts; + +@end + + +@interface FSCalendarHeader (Dynamic) + +@property (readonly, nonatomic) UICollectionView *collectionView; + +@end + + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarEventIndicator.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarEventIndicator.h new file mode 100644 index 0000000..8e96a30 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarEventIndicator.h @@ -0,0 +1,17 @@ +// +// FSCalendarEventView.h +// FSCalendar +// +// Created by dingwenchao on 2/3/16. +// Copyright © 2016 wenchaoios. All rights reserved. +// + +#import + +@interface FSCalendarEventIndicator : UIView + +@property (assign, nonatomic) NSInteger numberOfEvents; +@property (strong, nonatomic) id color; +@property (assign, nonatomic) BOOL needsAdjustingViewFrame; + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarEventIndicator.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarEventIndicator.m new file mode 100644 index 0000000..6705c7d --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarEventIndicator.m @@ -0,0 +1,143 @@ +// +// FSCalendarEventView.m +// FSCalendar +// +// Created by dingwenchao on 2/3/16. +// Copyright © 2016 wenchaoios. All rights reserved. +// + +#import "FSCalendarEventIndicator.h" +#import "FSCalendarConstance.h" +#import "UIView+FSExtension.h" +#import "CALayer+FSExtension.h" + +@interface FSCalendarEventIndicator () + +@property (weak, nonatomic) UIView *contentView; + +@property (strong, nonatomic) NSMutableArray *eventLayers; +@property (assign, nonatomic) BOOL needsInvalidatingColor; + +- (UIImage *)dotImageWithColor:(UIColor *)color diameter:(CGFloat)diameter; + +@end + +@implementation FSCalendarEventIndicator + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + + UIView *view = [[UIView alloc] initWithFrame:CGRectZero]; + [self addSubview:view]; + self.contentView = view; + + self.eventLayers = [NSMutableArray arrayWithCapacity:3]; + for (int i = 0; i < 3; i++) { + CALayer *layer = [CALayer layer]; + layer.masksToBounds = YES; + layer.backgroundColor = FSCalendarStandardEventDotColor.CGColor; + [self.eventLayers addObject:layer]; + [self.contentView.layer addSublayer:layer]; + } + + _needsInvalidatingColor = YES; + _needsAdjustingViewFrame = YES; + + } + return self; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + if (_needsAdjustingViewFrame) { + CGFloat diameter = MIN(MIN(self.fs_width, self.fs_height),FSCalendarMaximumEventDotDiameter); + self.contentView.fs_height = self.fs_height; + self.contentView.fs_width = (self.numberOfEvents*2-1)*diameter; + self.contentView.center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); + } +} + +- (void)layoutSublayersOfLayer:(CALayer *)layer +{ + [super layoutSublayersOfLayer:layer]; + if (layer == self.layer) { + if (_needsAdjustingViewFrame) { + _needsAdjustingViewFrame = NO; + CGFloat diameter = MIN(MIN(self.fs_width, self.fs_height),FSCalendarMaximumEventDotDiameter); + for (int i = 0; i < self.eventLayers.count; i++) { + CALayer *layer = self.eventLayers[i]; + layer.hidden = i >= self.numberOfEvents; + if (!layer.hidden) { + layer.frame = CGRectMake(2*i*diameter, (self.fs_height-diameter)*0.5, diameter, diameter); + layer.cornerRadius = diameter * 0.5; + } + } + } + if (_needsInvalidatingColor) { + _needsInvalidatingColor = NO; + CGFloat diameter = MIN(MIN(self.fs_width, self.fs_height),FSCalendarMaximumEventDotDiameter); + if ([_color isKindOfClass:[UIColor class]]) { + UIImage *dotImage = [self dotImageWithColor:_color diameter:diameter]; + [self.eventLayers makeObjectsPerformSelector:@selector(setContents:) withObject:(id)dotImage.CGImage]; + } else if ([_color isKindOfClass:[NSArray class]]) { + NSArray *colors = (NSArray *)_color; + if (colors.count) { + UIColor *lastColor = colors.firstObject; + for (int i = 0; i < self.numberOfEvents; i++) { + if (i < colors.count) { + lastColor = colors[i]; + } + CALayer *layer = self.eventLayers[i]; + UIImage *dotImage = [self dotImageWithColor:lastColor diameter:diameter]; + layer.contents = (id)dotImage.CGImage; + } + } + } + } + } +} + +- (void)setColor:(id)color +{ + if (![_color isEqual:color]) { + _color = color; + _needsInvalidatingColor = YES; + [self setNeedsLayout]; + } +} + +- (void)setNumberOfEvents:(NSInteger)numberOfEvents +{ + if (_numberOfEvents != numberOfEvents) { + _numberOfEvents = MIN(MAX(numberOfEvents,0),3); + _needsAdjustingViewFrame = YES; + [self setNeedsLayout]; + } +} + +- (void)setNeedsAdjustingViewFrame:(BOOL)needsAdjustingViewFrame +{ + if (_needsAdjustingViewFrame != needsAdjustingViewFrame) { + _needsAdjustingViewFrame = needsAdjustingViewFrame; + if (needsAdjustingViewFrame) { + [self setNeedsLayout]; + } + } +} + +- (UIImage *)dotImageWithColor:(UIColor *)color diameter:(CGFloat)diameter +{ + CGRect bounds = CGRectMake(0, 0, diameter, diameter); + UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0); + CGContextRef context = UIGraphicsGetCurrentContext(); + CGContextSetFillColorWithColor(context, color.CGColor); + CGContextFillEllipseInRect(context, bounds); + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return image; +} + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarFlowLayout.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarFlowLayout.h new file mode 100644 index 0000000..fc6f323 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarFlowLayout.h @@ -0,0 +1,20 @@ +// +// FSCalendarAnimationLayout.h +// FSCalendar +// +// Created by dingwenchao on 1/3/16. +// Copyright © 2016 wenchaoios. All rights reserved. +// + +#import + +@class FSCalendar; + +typedef NS_ENUM(NSUInteger, FSCalendarScope); + +@interface FSCalendarFlowLayout : UICollectionViewFlowLayout + +@property (weak, nonatomic) FSCalendar *calendar; + + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarFlowLayout.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarFlowLayout.m new file mode 100644 index 0000000..b7ef86c --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarFlowLayout.m @@ -0,0 +1,86 @@ +// +// FSCalendarAnimationLayout.m +// FSCalendar +// +// Created by dingwenchao on 1/3/16. +// Copyright © 2016 wenchaoios. All rights reserved. +// + +#import "FSCalendarFlowLayout.h" +#import "FSCalendarDynamicHeader.h" +#import "FSCalendar.h" +#import "UIView+FSExtension.h" +#import + +@implementation FSCalendarFlowLayout + +- (instancetype)init +{ + self = [super init]; + if (self) { + self.scrollDirection = UICollectionViewScrollDirectionHorizontal; + self.minimumInteritemSpacing = 0; + self.minimumLineSpacing = 0; + self.itemSize = CGSizeMake(1, 1); + self.sectionInset = UIEdgeInsetsZero; + } + return self; +} + +- (void)prepareLayout +{ + [super prepareLayout]; + + + CGFloat rowHeight = self.calendar.preferredRowHeight; + + if (!self.calendar.floatingMode) { + + self.headerReferenceSize = CGSizeZero; + + CGFloat padding = self.calendar.preferredWeekdayHeight*0.1; + if (self.scrollDirection == UICollectionViewScrollDirectionHorizontal) { + padding = FSCalendarFloor(padding); + rowHeight = FSCalendarFloor(rowHeight*2)*0.5; // Round to nearest multiple of 0.5. e.g. (16.8->16.5),(16.2->16.0) + } + self.sectionInset = UIEdgeInsetsMake(padding, 0, padding, 0); + switch (self.calendar.scope) { + + case FSCalendarScopeMonth: { + + CGSize itemSize = CGSizeMake( + self.collectionView.fs_width/7.0-(self.scrollDirection == UICollectionViewScrollDirectionVertical)*0.1, + rowHeight + ); + self.itemSize = itemSize; + + break; + } + case FSCalendarScopeWeek: { + + CGSize itemSize = CGSizeMake(self.collectionView.fs_width/7.0, rowHeight); + self.itemSize = itemSize; + + break; + + } + + } + } else { + + CGFloat headerHeight = self.calendar.preferredWeekdayHeight*1.5+self.calendar.preferredHeaderHeight; + self.headerReferenceSize = CGSizeMake(self.collectionView.fs_width, headerHeight); + + CGSize itemSize = CGSizeMake( + self.collectionView.fs_width/7-(self.scrollDirection == UICollectionViewScrollDirectionVertical)*0.1, + rowHeight + ); + self.itemSize = itemSize; + + self.sectionInset = UIEdgeInsetsZero; + + } + +} + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarHeader.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarHeader.h new file mode 100644 index 0000000..6b5b2f3 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarHeader.h @@ -0,0 +1,46 @@ +// +// FSCalendarHeader.h +// Pods +// +// Created by Wenchao Ding on 29/1/15. +// +// + +#import +#import "FSCalendarCollectionView.h" + +@class FSCalendar,FSCalendarAppearance; + +@interface FSCalendarHeader : UIView + +@property (weak, nonatomic) FSCalendarCollectionView *collectionView; +@property (weak, nonatomic) FSCalendar *calendar; +@property (weak, nonatomic) FSCalendarAppearance *appearance; + +@property (assign, nonatomic) CGFloat scrollOffset; +@property (assign, nonatomic) UICollectionViewScrollDirection scrollDirection; +@property (assign, nonatomic) BOOL scrollEnabled; +@property (assign, nonatomic) BOOL needsAdjustingViewFrame; + +- (void)reloadData; + +@end + + +@interface FSCalendarHeaderCell : UICollectionViewCell + +@property (weak, nonatomic) UILabel *titleLabel; +@property (weak, nonatomic) FSCalendarHeader *header; + +- (void)invalidateHeaderFont; +- (void)invalidateHeaderTextColor; + +@end + + +@interface FSCalendarHeaderTouchDeliver : UIView + +@property (weak, nonatomic) FSCalendar *calendar; +@property (weak, nonatomic) FSCalendarHeader *header; + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarHeader.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarHeader.m new file mode 100644 index 0000000..4e2d7a4 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarHeader.m @@ -0,0 +1,321 @@ +// +// FSCalendarHeader.m +// Pods +// +// Created by Wenchao Ding on 29/1/15. +// +// + +#import "FSCalendar.h" +#import "UIView+FSExtension.h" +#import "FSCalendarHeader.h" +#import "FSCalendarCollectionView.h" +#import "FSCalendarDynamicHeader.h" + +@interface FSCalendarHeader () + +@property (weak, nonatomic) UICollectionViewFlowLayout *collectionViewLayout; + +@property (assign, nonatomic) BOOL needsAdjustingMonthPosition; + +@end + +@implementation FSCalendarHeader + +#pragma mark - Life cycle + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self initialize]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + self = [super initWithCoder:aDecoder]; + if (self) { + [self initialize]; + } + return self; +} + +- (void)initialize +{ + _scrollDirection = UICollectionViewScrollDirectionHorizontal; + _scrollEnabled = YES; + _needsAdjustingMonthPosition = YES; + _needsAdjustingViewFrame = YES; + + UICollectionViewFlowLayout *collectionViewLayout = [[UICollectionViewFlowLayout alloc] init]; + collectionViewLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + collectionViewLayout.minimumInteritemSpacing = 0; + collectionViewLayout.minimumLineSpacing = 0; + collectionViewLayout.sectionInset = UIEdgeInsetsZero; + collectionViewLayout.itemSize = CGSizeMake(1, 1); + self.collectionViewLayout = collectionViewLayout; + + FSCalendarCollectionView *collectionView = [[FSCalendarCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:collectionViewLayout]; + collectionView.scrollEnabled = NO; + collectionView.userInteractionEnabled = NO; + collectionView.backgroundColor = [UIColor clearColor]; + collectionView.dataSource = self; + collectionView.delegate = self; + collectionView.showsHorizontalScrollIndicator = NO; + collectionView.showsVerticalScrollIndicator = NO; + [self addSubview:collectionView]; + [collectionView registerClass:[FSCalendarHeaderCell class] forCellWithReuseIdentifier:@"cell"]; + self.collectionView = collectionView; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + + if (_needsAdjustingViewFrame) { + _needsAdjustingViewFrame = NO; + _collectionViewLayout.itemSize = CGSizeMake(1, 1); + _collectionView.frame = CGRectMake(0, self.fs_height*0.1, self.fs_width, self.fs_height*0.9); + _collectionViewLayout.itemSize = CGSizeMake( + _collectionView.fs_width*((_scrollDirection==UICollectionViewScrollDirectionHorizontal)?0.5:1), + _collectionView.fs_height + ); + } + + if (_needsAdjustingMonthPosition) { + _needsAdjustingMonthPosition = NO; + if (self.scrollDirection == UICollectionViewScrollDirectionHorizontal) { + [_collectionView setContentOffset:CGPointMake((_scrollOffset+0.5)*_collectionViewLayout.itemSize.width, 0) animated:NO]; + } else { + [_collectionView setContentOffset:CGPointMake(0, _scrollOffset * _collectionViewLayout.itemSize.height) animated:NO]; + } + }; + +} + +- (void)dealloc +{ + _collectionView.dataSource = nil; + _collectionView.delegate = nil; +} + +#pragma mark - + +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView +{ + return 1; +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section +{ + switch (self.calendar.scope) { + case FSCalendarScopeMonth: { + switch (_scrollDirection) { + case UICollectionViewScrollDirectionVertical: { + NSDate *minimumPage = [_calendar beginingOfMonthOfDate:_calendar.minimumDate]; + NSInteger count = [_calendar monthsFromDate:minimumPage toDate:_calendar.maximumDate] + 1; + return count; + } + case UICollectionViewScrollDirectionHorizontal: { + // 这里需要默认多出两项,否则当contentOffset为负时,切换到其他页面时会自动归零 + // 2 more pages to prevent scrollView from auto bouncing while push/present to other UIViewController + NSDate *minimumPage = [_calendar beginingOfMonthOfDate:_calendar.minimumDate]; + NSInteger count = [_calendar monthsFromDate:minimumPage toDate:_calendar.maximumDate] + 1; + return count + 2; + } + default: { + break; + } + } + break; + } + case FSCalendarScopeWeek: { + NSDate *minimumPage = [_calendar beginingOfMonthOfDate:_calendar.minimumDate]; + NSInteger count = [_calendar weeksFromDate:minimumPage toDate:_calendar.maximumDate] + 1; + return count + 2; + } + default: { + break; + } + } + return 0; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath +{ + FSCalendarHeaderCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath]; + cell.header = self; + cell.titleLabel.font = _appearance.preferredHeaderTitleFont; + cell.titleLabel.textColor = _appearance.headerTitleColor; + _calendar.formatter.dateFormat = _appearance.headerDateFormat; + BOOL usesUpperCase = (_appearance.caseOptions & 15) == FSCalendarCaseOptionsHeaderUsesUpperCase; + NSString *text = nil; + switch (self.calendar.scope) { + case FSCalendarScopeMonth: { + if (_scrollDirection == UICollectionViewScrollDirectionHorizontal) { + // 多出的两项需要制空 + if ((indexPath.item == 0 || indexPath.item == [collectionView numberOfItemsInSection:0] - 1)) { + text = nil; + } else { + NSDate *date = [_calendar dateByAddingMonths:indexPath.item-1 toDate:_calendar.minimumDate]; + text = [_calendar.formatter stringFromDate:date]; + } + } else { + NSDate *date = [_calendar dateByAddingMonths:indexPath.item toDate:_calendar.minimumDate]; + text = [_calendar.formatter stringFromDate:date]; + } + break; + } + case FSCalendarScopeWeek: { + if ((indexPath.item == 0 || indexPath.item == [collectionView numberOfItemsInSection:0] - 1)) { + text = nil; + } else { + NSDate *firstPage = [_calendar middleOfWeekFromDate:_calendar.minimumDate]; + NSDate *date = [_calendar dateByAddingWeeks:indexPath.item-1 toDate:firstPage]; + text = [_calendar.formatter stringFromDate:date]; + } + break; + } + default: { + break; + } + } + text = usesUpperCase ? text.uppercaseString : text; + cell.titleLabel.text = text; + [cell setNeedsLayout]; + return cell; +} + +- (void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath +{ + [cell setNeedsLayout]; +} + +- (void)scrollViewDidScroll:(UIScrollView *)scrollView +{ + [_collectionView.visibleCells makeObjectsPerformSelector:@selector(setNeedsLayout)]; +} + +#pragma mark - Properties + + +- (void)setCalendar:(FSCalendar *)calendar +{ + if (![_calendar isEqual:calendar]) { + _calendar = calendar; + _appearance = calendar.appearance; + } +} + + +- (void)setScrollOffset:(CGFloat)scrollOffset +{ + if (_scrollOffset != scrollOffset) { + _scrollOffset = scrollOffset; + } + _needsAdjustingMonthPosition = YES; + [self setNeedsLayout]; +} + +- (void)setScrollDirection:(UICollectionViewScrollDirection)scrollDirection +{ + if (_scrollDirection != scrollDirection) { + _scrollDirection = scrollDirection; + _collectionViewLayout.scrollDirection = scrollDirection; + _needsAdjustingMonthPosition = YES; + _needsAdjustingViewFrame = YES; + [self setNeedsLayout]; + } +} + +- (void)setScrollEnabled:(BOOL)scrollEnabled +{ + if (_scrollEnabled != scrollEnabled) { + _scrollEnabled = scrollEnabled; + [_collectionView.visibleCells makeObjectsPerformSelector:@selector(setNeedsLayout)]; + } +} + +#pragma mark - Public + +- (void)reloadData +{ + [_collectionView reloadData]; +} + +@end + + +@implementation FSCalendarHeaderCell + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; + titleLabel.textAlignment = NSTextAlignmentCenter; + titleLabel.lineBreakMode = NSLineBreakByWordWrapping; + titleLabel.numberOfLines = 0; + [self.contentView addSubview:titleLabel]; + self.titleLabel = titleLabel; + } + return self; +} + +- (void)setBounds:(CGRect)bounds +{ + [super setBounds:bounds]; + _titleLabel.frame = bounds; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + + self.titleLabel.frame = self.contentView.bounds; + + if (self.header.scrollDirection == UICollectionViewScrollDirectionHorizontal) { + CGFloat position = [self.contentView convertPoint:CGPointMake(CGRectGetMidX(self.contentView.bounds), CGRectGetMidY(self.contentView.bounds)) toView:self.header].x; + CGFloat center = CGRectGetMidX(self.header.bounds); + if (self.header.scrollEnabled) { + self.contentView.alpha = 1.0 - (1.0-self.header.appearance.headerMinimumDissolvedAlpha)*ABS(center-position)/self.fs_width; + } else { + self.contentView.alpha = (position > 0 && position < self.header.fs_width*0.75); + } + } else if (self.header.scrollDirection == UICollectionViewScrollDirectionVertical) { + CGFloat position = [self.contentView convertPoint:CGPointMake(CGRectGetMidX(self.contentView.bounds), CGRectGetMidY(self.contentView.bounds)) toView:self.header].y; + CGFloat center = CGRectGetMidY(self.header.bounds); + self.contentView.alpha = 1.0 - (1.0-self.header.appearance.headerMinimumDissolvedAlpha)*ABS(center-position)/self.fs_height; + } + +} + +- (void)invalidateHeaderFont +{ + _titleLabel.font = self.header.appearance.preferredHeaderTitleFont; +} + +- (void)invalidateHeaderTextColor +{ + _titleLabel.textColor = self.header.appearance.headerTitleColor; +} + +@end + + +@implementation FSCalendarHeaderTouchDeliver + +- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event +{ + UIView *hitView = [super hitTest:point withEvent:event]; + if (hitView == self) { + return _calendar.collectionView ?: hitView; + } + return hitView; +} + +@end + + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarStickyHeader.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarStickyHeader.h new file mode 100644 index 0000000..4a851ec --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarStickyHeader.h @@ -0,0 +1,30 @@ +// +// FSCalendarStaticHeader.h +// FSCalendar +// +// Created by dingwenchao on 9/17/15. +// Copyright (c) 2015 wenchaoios. All rights reserved. +// + +#import + +@class FSCalendar,FSCalendarAppearance; + +@interface FSCalendarStickyHeader : UICollectionReusableView + +@property (weak, nonatomic) FSCalendar *calendar; +@property (weak, nonatomic) FSCalendarAppearance *appearance; + +@property (weak, nonatomic) UILabel *titleLabel; + +@property (strong, nonatomic) NSArray *weekdayLabels; +@property (strong, nonatomic) NSDate *month; + +- (void)invalidateHeaderFont; +- (void)invalidateHeaderTextColor; +- (void)invalidateWeekdayFont; +- (void)invalidateWeekdayTextColor; + +- (void)invalidateWeekdaySymbols; + +@end \ No newline at end of file diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarStickyHeader.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarStickyHeader.m new file mode 100644 index 0000000..1038117 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/FSCalendarStickyHeader.m @@ -0,0 +1,157 @@ +// +// FSCalendarStaticHeader.m +// FSCalendar +// +// Created by dingwenchao on 9/17/15. +// Copyright (c) 2015 wenchaoios. All rights reserved. +// + +#import "FSCalendarStickyHeader.h" +#import "FSCalendar.h" +#import "UIView+FSExtension.h" +#import "FSCalendarConstance.h" +#import "FSCalendarDynamicHeader.h" + +@interface FSCalendarStickyHeader () + +@property (weak, nonatomic) UIView *contentView; +@property (weak, nonatomic) UIView *separator; + +@property (assign, nonatomic) BOOL needsAdjustingViewFrame; + +@end + +@implementation FSCalendarStickyHeader + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + + _needsAdjustingViewFrame = YES; + + UIView *view; + UILabel *label; + + view = [[UIView alloc] initWithFrame:CGRectZero]; + view.backgroundColor = [UIColor clearColor]; + [self addSubview:view]; + self.contentView = view; + + label = [[UILabel alloc] initWithFrame:CGRectZero]; + label.textAlignment = NSTextAlignmentCenter; + label.numberOfLines = 0; + [_contentView addSubview:label]; + self.titleLabel = label; + + view = [[UIView alloc] initWithFrame:CGRectZero]; + view.backgroundColor = [[UIColor lightGrayColor] colorWithAlphaComponent:0.25]; + [_contentView addSubview:view]; + self.separator = view; + + NSMutableArray *weekdayLabels = [NSMutableArray arrayWithCapacity:7]; + for (int i = 0; i < 7; i++) { + label = [[UILabel alloc] initWithFrame:CGRectZero]; + label.textAlignment = NSTextAlignmentCenter; + [_contentView addSubview:label]; + [weekdayLabels addObject:label]; + } + self.weekdayLabels = weekdayLabels.copy; + } + return self; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + + if (_needsAdjustingViewFrame) { + + _needsAdjustingViewFrame = NO; + _contentView.frame = self.bounds; + + CGFloat weekdayWidth = self.fs_width / 7.0; + CGFloat weekdayHeight = _calendar.preferredWeekdayHeight; + CGFloat weekdayMargin = weekdayHeight * 0.1; + CGFloat titleWidth = _contentView.fs_width; + + [_weekdayLabels enumerateObjectsUsingBlock:^(UILabel *label, NSUInteger index, BOOL *stop) { \ + label.frame = CGRectMake(index*weekdayWidth, _contentView.fs_height-weekdayHeight-weekdayMargin, weekdayWidth, weekdayHeight); + }]; + + CGFloat titleHeight = [@"1" sizeWithAttributes:@{NSFontAttributeName:_appearance.preferredHeaderTitleFont}].height*1.5 + weekdayMargin*3; + + _separator.frame = CGRectMake(0, _contentView.fs_height-weekdayHeight-weekdayMargin*2, _contentView.fs_width, 1.0); + _titleLabel.frame = CGRectMake(0, _separator.fs_bottom-titleHeight-weekdayMargin, titleWidth,titleHeight); + + } + + [self reloadData]; +} + +#pragma mark - Properties + +- (void)setCalendar:(FSCalendar *)calendar +{ + if (![_calendar isEqual:calendar]) { + _calendar = calendar; + } + if (![_appearance isEqual:calendar.appearance]) { + _appearance = calendar.appearance; + [self invalidateHeaderFont]; + [self invalidateHeaderTextColor]; + [self invalidateWeekdayFont]; + [self invalidateWeekdayTextColor]; + } +} + +#pragma mark - Public methods + +- (void)reloadData +{ + [self invalidateWeekdaySymbols]; + _calendar.formatter.dateFormat = _appearance.headerDateFormat; + BOOL usesUpperCase = (_appearance.caseOptions & 15) == FSCalendarCaseOptionsHeaderUsesUpperCase; + NSString *text = [_calendar.formatter stringFromDate:_month]; + text = usesUpperCase ? text.uppercaseString : text; + _titleLabel.text = text; +} + +#pragma mark - Private methods + +- (void)invalidateHeaderFont +{ + _titleLabel.font = _appearance.headerTitleFont; +} + +- (void)invalidateHeaderTextColor +{ + _titleLabel.textColor = _appearance.headerTitleColor; +} + +- (void)invalidateWeekdayFont +{ + [_weekdayLabels makeObjectsPerformSelector:@selector(setFont:) withObject:_appearance.weekdayFont]; +} + +- (void)invalidateWeekdayTextColor +{ + [_weekdayLabels makeObjectsPerformSelector:@selector(setTextColor:) withObject:_appearance.weekdayTextColor]; +} + +- (void)invalidateWeekdaySymbols +{ + BOOL useVeryShortWeekdaySymbols = (_appearance.caseOptions & (15<<4) ) == FSCalendarCaseOptionsWeekdayUsesSingleUpperCase; + NSArray *weekdaySymbols = useVeryShortWeekdaySymbols ? _calendar.calendar.veryShortStandaloneWeekdaySymbols : _calendar.calendar.shortStandaloneWeekdaySymbols; + BOOL useDefaultWeekdayCase = (_appearance.caseOptions & (15<<4) ) == FSCalendarCaseOptionsWeekdayUsesDefaultCase; + [_weekdayLabels enumerateObjectsUsingBlock:^(UILabel *label, NSUInteger index, BOOL *stop) { + index += _calendar.firstWeekday-1; + index %= 7; + label.text = useDefaultWeekdayCase ? weekdaySymbols[index] : [weekdaySymbols[index] uppercaseString]; + }]; +} + + +@end + + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSDate+FSExtension.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSDate+FSExtension.h new file mode 100644 index 0000000..c91d31c --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSDate+FSExtension.h @@ -0,0 +1,79 @@ +// +// NSDate+FSExtension.h +// Pods +// +// Created by Wenchao Ding on 29/1/15. +// +// + +#import + +/** + * This category is deprecated in this framework as it premised that the calendar should be gregorian. But feel free to use it for gregorian-only. + */ +@interface NSDate (FSExtension) + +@property (readonly, nonatomic) NSInteger fs_year; +@property (readonly, nonatomic) NSInteger fs_month; +@property (readonly, nonatomic) NSInteger fs_day; +@property (readonly, nonatomic) NSInteger fs_weekday; +@property (readonly, nonatomic) NSInteger fs_weekOfYear; +@property (readonly, nonatomic) NSInteger fs_hour; +@property (readonly, nonatomic) NSInteger fs_minute; +@property (readonly, nonatomic) NSInteger fs_second; + +@property (readonly, nonatomic) NSDate *fs_dateByIgnoringTimeComponents; +@property (readonly, nonatomic) NSDate *fs_firstDayOfMonth; +@property (readonly, nonatomic) NSDate *fs_lastDayOfMonth; +@property (readonly, nonatomic) NSDate *fs_firstDayOfWeek; +@property (readonly, nonatomic) NSDate *fs_middleOfWeek; +@property (readonly, nonatomic) NSDate *fs_tomorrow; +@property (readonly, nonatomic) NSDate *fs_yesterday; +@property (readonly, nonatomic) NSInteger fs_numberOfDaysInMonth; + ++ (instancetype)fs_dateFromString:(NSString *)string format:(NSString *)format; ++ (instancetype)fs_dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day; + +- (NSDate *)fs_dateByAddingYears:(NSInteger)years; +- (NSDate *)fs_dateBySubtractingYears:(NSInteger)years; +- (NSDate *)fs_dateByAddingMonths:(NSInteger)months; +- (NSDate *)fs_dateBySubtractingMonths:(NSInteger)months; +- (NSDate *)fs_dateByAddingWeeks:(NSInteger)weeks; +- (NSDate *)fs_dateBySubtractingWeeks:(NSInteger)weeks; +- (NSDate *)fs_dateByAddingDays:(NSInteger)days; +- (NSDate *)fs_dateBySubtractingDays:(NSInteger)days; +- (NSInteger)fs_yearsFrom:(NSDate *)date; +- (NSInteger)fs_monthsFrom:(NSDate *)date; +- (NSInteger)fs_weeksFrom:(NSDate *)date; +- (NSInteger)fs_daysFrom:(NSDate *)date; + +- (BOOL)fs_isEqualToDateForMonth:(NSDate *)date; +- (BOOL)fs_isEqualToDateForWeek:(NSDate *)date; +- (BOOL)fs_isEqualToDateForDay:(NSDate *)date; + +- (NSString *)fs_stringWithFormat:(NSString *)format; +- (NSString *)fs_string; + +@end + + +@interface NSCalendar (FSExtension) + ++ (instancetype)fs_sharedCalendar; + +@end + +@interface NSDateFormatter (FSExtension) + ++ (instancetype)fs_sharedDateFormatter; + +@end + +@interface NSDateComponents (FSExtension) + ++ (instancetype)fs_sharedDateComponents; + +@end + + + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSDate+FSExtension.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSDate+FSExtension.m new file mode 100644 index 0000000..7a46413 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSDate+FSExtension.m @@ -0,0 +1,344 @@ +// +// NSDate+FSExtension.m +// Pods +// +// Created by Wenchao Ding on 29/1/15. +// +// + +#import "NSDate+FSExtension.h" + +@implementation NSDate (FSExtension) + +- (NSInteger)fs_year +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *component = [calendar components:NSCalendarUnitYear fromDate:self]; + return component.year; +} + +- (NSInteger)fs_month +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *component = [calendar components:NSCalendarUnitMonth + fromDate:self]; + return component.month; +} + +- (NSInteger)fs_day +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *component = [calendar components:NSCalendarUnitDay + fromDate:self]; + return component.day; +} + +- (NSInteger)fs_weekday +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *component = [calendar components:NSCalendarUnitWeekday fromDate:self]; + return component.weekday; +} + +- (NSInteger)fs_weekOfYear +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *component = [calendar components:NSCalendarUnitWeekOfYear fromDate:self]; + return component.weekOfYear; +} + +- (NSInteger)fs_hour +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *component = [calendar components:NSCalendarUnitHour + fromDate:self]; + return component.hour; +} + +- (NSInteger)fs_minute +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *component = [calendar components:NSCalendarUnitMinute + fromDate:self]; + return component.minute; +} + +- (NSInteger)fs_second +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *component = [calendar components:NSCalendarUnitSecond + fromDate:self]; + return component.second; +} + +- (NSDate *)fs_dateByIgnoringTimeComponents +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:self]; + return [calendar dateFromComponents:components]; +} + +- (NSDate *)fs_firstDayOfMonth +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth| NSCalendarUnitDay fromDate:self]; + components.day = 1; + return [calendar dateFromComponents:components]; +} + +- (NSDate *)fs_lastDayOfMonth +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:self]; + components.month++; + components.day = 0; + return [calendar dateFromComponents:components]; +} + +- (NSDate *)fs_firstDayOfWeek +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *weekdayComponents = [calendar components:NSCalendarUnitWeekday fromDate:self]; + NSDateComponents *componentsToSubtract = [NSDateComponents fs_sharedDateComponents]; + componentsToSubtract.day = - (weekdayComponents.weekday - calendar.firstWeekday); + NSDate *beginningOfWeek = [calendar dateByAddingComponents:componentsToSubtract toDate:self options:0]; + NSDateComponents *components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:beginningOfWeek]; + beginningOfWeek = [calendar dateFromComponents:components]; + componentsToSubtract.day = NSIntegerMax; + return beginningOfWeek; +} + +- (NSDate *)fs_middleOfWeek +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *weekdayComponents = [calendar components:NSCalendarUnitWeekday fromDate:self]; + NSDateComponents *componentsToSubtract = [NSDateComponents fs_sharedDateComponents]; + componentsToSubtract.day = - (weekdayComponents.weekday - calendar.firstWeekday) + 3; + NSDate *middleOfWeek = [calendar dateByAddingComponents:componentsToSubtract toDate:self options:0]; + NSDateComponents *components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:middleOfWeek]; + middleOfWeek = [calendar dateFromComponents:components]; + componentsToSubtract.day = NSIntegerMax; + return middleOfWeek; +} + +- (NSDate *)fs_tomorrow +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:self]; + components.day++; + return [calendar dateFromComponents:components]; +} + +- (NSDate *)fs_yesterday +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:self]; + components.day--; + return [calendar dateFromComponents:components]; +} + +- (NSInteger)fs_numberOfDaysInMonth +{ + NSCalendar *c = [NSCalendar fs_sharedCalendar]; + NSRange days = [c rangeOfUnit:NSCalendarUnitDay + inUnit:NSCalendarUnitMonth + forDate:self]; + return days.length; +} + ++ (instancetype)fs_dateFromString:(NSString *)string format:(NSString *)format +{ + NSDateFormatter *formatter = [NSDateFormatter fs_sharedDateFormatter]; + formatter.dateFormat = format; + return [formatter dateFromString:string]; +} + ++ (instancetype)fs_dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [NSDateComponents fs_sharedDateComponents]; + components.year = year; + components.month = month; + components.day = day; + NSDate *date = [calendar dateFromComponents:components]; + components.year = NSIntegerMax; + components.month = NSIntegerMax; + components.day = NSIntegerMax; + return date; +} + +- (NSDate *)fs_dateByAddingYears:(NSInteger)years +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [NSDateComponents fs_sharedDateComponents]; + components.year = years; + NSDate *date = [calendar dateByAddingComponents:components toDate:self options:0]; + components.year = NSIntegerMax; + return date; +} + +- (NSDate *)fs_dateBySubtractingYears:(NSInteger)years +{ + return [self fs_dateByAddingYears:-years]; +} + +- (NSDate *)fs_dateByAddingMonths:(NSInteger)months +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [NSDateComponents fs_sharedDateComponents]; + components.month = months; + NSDate *date = [calendar dateByAddingComponents:components toDate:self options:0]; + components.month = NSIntegerMax; + return date; +} + +- (NSDate *)fs_dateBySubtractingMonths:(NSInteger)months +{ + return [self fs_dateByAddingMonths:-months]; +} + +- (NSDate *)fs_dateByAddingWeeks:(NSInteger)weeks +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [NSDateComponents fs_sharedDateComponents]; + components.weekOfYear = weeks; + NSDate *date = [calendar dateByAddingComponents:components toDate:self options:0]; + components.weekOfYear = NSIntegerMax; + return date; +} + +-(NSDate *)fs_dateBySubtractingWeeks:(NSInteger)weeks +{ + return [self fs_dateByAddingWeeks:-weeks]; +} + +- (NSDate *)fs_dateByAddingDays:(NSInteger)days +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [NSDateComponents fs_sharedDateComponents]; + components.day = days; + NSDate *date = [calendar dateByAddingComponents:components toDate:self options:0]; + components.day = NSIntegerMax; + return date; +} + +- (NSDate *)fs_dateBySubtractingDays:(NSInteger)days +{ + return [self fs_dateByAddingDays:-days]; +} + +- (NSInteger)fs_yearsFrom:(NSDate *)date +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [calendar components:NSCalendarUnitYear + fromDate:date + toDate:self + options:0]; + return components.year; +} + +- (NSInteger)fs_monthsFrom:(NSDate *)date +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [calendar components:NSCalendarUnitMonth + fromDate:date + toDate:self + options:0]; + return components.month; +} + +- (NSInteger)fs_weeksFrom:(NSDate *)date +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [calendar components:NSCalendarUnitWeekOfYear + fromDate:date + toDate:self + options:0]; + return components.weekOfYear; +} + +- (NSInteger)fs_daysFrom:(NSDate *)date +{ + NSCalendar *calendar = [NSCalendar fs_sharedCalendar]; + NSDateComponents *components = [calendar components:NSCalendarUnitDay + fromDate:date + toDate:self + options:0]; + return components.day; +} + +- (NSString *)fs_stringWithFormat:(NSString *)format +{ + NSDateFormatter *formatter = [NSDateFormatter fs_sharedDateFormatter]; + formatter.dateFormat = format; + return [formatter stringFromDate:self]; +} + +- (NSString *)fs_string +{ + return [self fs_stringWithFormat:@"yyyyMMdd"]; +} + + +- (BOOL)fs_isEqualToDateForMonth:(NSDate *)date +{ + return self.fs_year == date.fs_year && self.fs_month == date.fs_month; +} + +- (BOOL)fs_isEqualToDateForWeek:(NSDate *)date +{ + return self.fs_year == date.fs_year && self.fs_weekOfYear == date.fs_weekOfYear; +} + +- (BOOL)fs_isEqualToDateForDay:(NSDate *)date +{ + return self.fs_year == date.fs_year && self.fs_month == date.fs_month && self.fs_day == date.fs_day; +} + +@end + + +@implementation NSCalendar (FSExtension) + ++ (instancetype)fs_sharedCalendar +{ + static id instance; + static dispatch_once_t fs_sharedCalendar_onceToken; + dispatch_once(&fs_sharedCalendar_onceToken, ^{ + instance = [NSCalendar currentCalendar]; + }); + return instance; +} + +@end + + +@implementation NSDateFormatter (FSExtension) + ++ (instancetype)fs_sharedDateFormatter +{ + static id instance; + static dispatch_once_t fs_sharedDateFormatter_onceToken; + dispatch_once(&fs_sharedDateFormatter_onceToken, ^{ + instance = [[NSDateFormatter alloc] init]; + }); + return instance; +} + +@end + +@implementation NSDateComponents (FSExtension) + ++ (instancetype)fs_sharedDateComponents +{ + static id instance; + static dispatch_once_t fs_sharedDateFormatter_onceToken; + dispatch_once(&fs_sharedDateFormatter_onceToken, ^{ + instance = [[NSDateComponents alloc] init]; + }); + return instance; +} + +@end + + diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSString+FSExtension.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSString+FSExtension.h new file mode 100644 index 0000000..abffa9a --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSString+FSExtension.h @@ -0,0 +1,16 @@ +// +// NSString+FSExtension.h +// FSCalendar +// +// Created by Wenchao Ding on 8/29/15. +// Copyright (c) 2015 wenchaoios. All rights reserved. +// + +#import + +@interface NSString (FSExtension) + +- (NSDate *)fs_dateWithFormat:(NSString *)format; +- (NSDate *)fs_date; + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSString+FSExtension.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSString+FSExtension.m new file mode 100644 index 0000000..ce22fb0 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/NSString+FSExtension.m @@ -0,0 +1,26 @@ +// +// NSString+FSExtension.m +// FSCalendar +// +// Created by Wenchao Ding on 8/29/15. +// Copyright (c) 2015 wenchaoios. All rights reserved. +// + +#import "NSString+FSExtension.h" +#import "NSDate+FSExtension.h" + +@implementation NSString (FSExtension) + +- (NSDate *)fs_dateWithFormat:(NSString *)format +{ + NSDateFormatter *formatter = [NSDateFormatter fs_sharedDateFormatter]; + formatter.dateFormat = format; + return [formatter dateFromString:self]; +} + +- (NSDate *)fs_date +{ + return [self fs_dateWithFormat:@"yyyyMMdd"]; +} + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/UIView+FSExtension.h b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/UIView+FSExtension.h new file mode 100644 index 0000000..3dfbea0 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/UIView+FSExtension.h @@ -0,0 +1,21 @@ +// +// UIView+FSExtension.h +// Pods +// +// Created by Wenchao Ding on 29/1/15. +// +// + +#import + +@interface UIView (FSExtension) + +@property (nonatomic) CGFloat fs_width; +@property (nonatomic) CGFloat fs_height; + +@property (nonatomic) CGFloat fs_top; +@property (nonatomic) CGFloat fs_left; +@property (nonatomic) CGFloat fs_bottom; +@property (nonatomic) CGFloat fs_right; + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/FSCalendar/UIView+FSExtension.m b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/UIView+FSExtension.m new file mode 100644 index 0000000..e11507f --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/FSCalendar/UIView+FSExtension.m @@ -0,0 +1,73 @@ +// +// UIView+FSExtension.m +// Pods +// +// Created by Wenchao Ding on 29/1/15. +// +// + +#import "UIView+FSExtension.h" + +@implementation UIView (FSExtension) + +- (CGFloat)fs_width +{ + return CGRectGetWidth(self.frame); +} + +- (void)setFs_width:(CGFloat)fs_width +{ + self.frame = CGRectMake(self.fs_left, self.fs_top, fs_width, self.fs_height); +} + +- (CGFloat)fs_height +{ + return CGRectGetHeight(self.frame); +} + +- (void)setFs_height:(CGFloat)fs_height +{ + self.frame = CGRectMake(self.fs_left, self.fs_top, self.fs_width, fs_height); +} + +- (CGFloat)fs_top +{ + return CGRectGetMinY(self.frame); +} + +- (void)setFs_top:(CGFloat)fs_top +{ + self.frame = CGRectMake(self.fs_left, fs_top, self.fs_width, self.fs_height); +} + +- (CGFloat)fs_bottom +{ + return CGRectGetMaxY(self.frame); +} + +- (void)setFs_bottom:(CGFloat)fs_bottom +{ + self.fs_top = fs_bottom - self.fs_height; +} + +- (CGFloat)fs_left +{ + return CGRectGetMinX(self.frame); +} + +- (void)setFs_left:(CGFloat)fs_left +{ + self.frame = CGRectMake(fs_left, self.fs_top, self.fs_width, self.fs_height); +} + +- (CGFloat)fs_right +{ + return CGRectGetMaxX(self.frame); +} + +- (void)setFs_right:(CGFloat)fs_right +{ + self.fs_left = self.fs_right - self.fs_width; +} + +@end diff --git a/Verdnaturaventas/Pods/FSCalendar/LICENSE b/Verdnaturaventas/Pods/FSCalendar/LICENSE new file mode 100644 index 0000000..656a6e1 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013-2016 FSCalendar (https://github.com/WenchaoIOS/FSCalendar) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Verdnaturaventas/Pods/FSCalendar/README.md b/Verdnaturaventas/Pods/FSCalendar/README.md new file mode 100644 index 0000000..c62c481 --- /dev/null +++ b/Verdnaturaventas/Pods/FSCalendar/README.md @@ -0,0 +1,149 @@ +![fscalendar](https://cloud.githubusercontent.com/assets/5186464/6655324/213a814a-cb36-11e4-9add-f80515a83291.png)

+[![Travis](https://travis-ci.org/WenchaoD/FSCalendar.svg?branch=master)](https://travis-ci.org/WenchaoD/FSCalendar) +[![Version](https://img.shields.io/cocoapods/v/FSCalendar.svg?style=flat)](http://cocoadocs.org/docsets/FSCalendar) +[![Platform](https://img.shields.io/badge/platform-iOS%207%2B-blue.svg?style=flat)](http://cocoadocs.org/docsets/FSCalendar) +[![Swift2 compatible](https://img.shields.io/badge/swift2-compatible-4BC51D.svg?style=flat)](https://developer.apple.com/swift/) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![License](https://img.shields.io/cocoapods/l/FSCalendar.svg?style=flat)](http://cocoadocs.org/docsets/FSCalendar) +[![Join the chat at https://gitter.im/WenchaoD/FSCalendar](https://badges.gitter.im/WenchaoD/FSCalendar.svg)](https://gitter.im/WenchaoD/FSCalendar?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +# Screenshots + +## iPhone +![fscalendar](https://cloud.githubusercontent.com/assets/5186464/10262249/4fabae40-69f2-11e5-97ab-afbacd0a3da2.jpg) + +## iPad +![fscalendar-ipad](https://cloud.githubusercontent.com/assets/5186464/10927681/d2448cb6-82dc-11e5-9d11-f664a06698a7.jpg) + +## Working with AutoLayout and Orientation +![fscalendar-scope-orientation-autolayout](https://cloud.githubusercontent.com/assets/5186464/13728798/59855e3e-e95e-11e5-84db-60f843427ef3.gif) + +# Installation + +## CocoaPods: + +* For iOS8+: 👍 +```ruby +use_frameworks! +pod 'FSCalendar' +``` + +* For iOS7+: +```ruby +pod 'FSCalendar' +``` + +* Alternatively to give it a test run, run the command: +```ruby +pod try FSCalendar +``` + +## Carthage: +* For iOS8+ +```ruby +github "WenchaoD/FSCalendar" +``` + +## Manually: +* Drag all files under `FSCalendar` folder into your project. 👍 + +## Support IBInspectable / IBDesignable +Only the methods marked "👍" support IBInspectable / IBDesignable feature. [Have fun with Interface builder](#roll_with_interface_builder) + +# Setup + +## Use Interface Builder + +1. Drag an UIView object to ViewController Scene +2. Change the `Custom Class` to `FSCalendar`
+3. Link `dataSource` and `delegate` to the ViewController
+ +![fscalendar-ib](https://cloud.githubusercontent.com/assets/5186464/9488580/a360297e-4c0d-11e5-8548-ee9274e7c4af.jpg) + +4. Finally, you should implement `FSCalendarDataSource` and `FSCalendarDelegate` in ViewController.m + +## Or use code + +```objc +@property (weak , nonatomic) FSCalendar *calendar; +``` +```objc +// In loadView(Recommended) or viewDidLoad +FSCalendar *calendar = [[FSCalendar alloc] initWithFrame:CGRectMake(0, 0, 320, 300)]; +calendar.dataSource = self; +calendar.delegate = self; +[self.view addSubview:calendar]; +self.calendar = calendar; +``` +
+ +## Or swift + +* To use `FSCalendar` in swift, you need to [Create Bridge Header](https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html) first. + + +```swift +private weak var calendar: FSCalendar! +``` +```swift +// In loadView or viewDidLoad +let calendar = FSCalendar(frame: CGRect(x: 0, y: 0, width: 320, height: 300)) +calendar.dataSource = self +calendar.delegate = self +view.addSubview(calendar) +self.calendar = calendar +``` +
+ + +## Hide placeholder dates +![fscalendar-showsplaceholder](https://cloud.githubusercontent.com/assets/5186464/13727902/21a90042-e940-11e5-9b9f-392f38cf007d.gif) + +1. Set `calendar.showsPlaceholders = NO`; +2. Implement `-calendar:boundingRectWillChange:animated:` + +```objc +// For autoLayout +- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated +{ + _calendarHeightConstraint.constant = CGRectGetHeight(bounds); + [self.view layoutIfNeeded]; +} +``` + +```objc +// For manual layout +- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated +{ + calendar.frame = (CGRect){calendar.frame.origin,bounds.size}; +} +``` + +### Roll with Interface Builder +![fscalendar - ibdesignable](https://cloud.githubusercontent.com/assets/5186464/9301716/2e76a2ca-4503-11e5-8450-1fa7aa93e9fd.gif) + +## More Usage +* To view more usage, download the zip file and read the example. +* Or you could refer to [this document](https://github.com/WenchaoD/FSCalendar/blob/master/MOREUSAGE.md) +* To view the full documentation, see [CocoaPods Documentation](http://cocoadocs.org/docsets/FSCalendar/2.0.1/) + +# If you like this repo +* ***Star*** this repo. +* Send your calendar screenshot or `itunes link address` [here](https://github.com/WenchaoD/FSCalendar/issues/2). + +# Support me via [![paypal](https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg)](https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg) +* ☕️ [This coffee is on me!](https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=Z84P82H3V4Q26&lc=C2&item_name=This%20coffee%20is%20on%20me%21&item_number=Support%20FSCalendar%20%2d%20WenchaoIOS&amount=5%2e00¤cy_code=USD&button_subtype=services&bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHosted) +* [Lunch is on me!](https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=Z84P82H3V4Q26&lc=C2&item_name=Lunch%20is%20on%20me%21&item_number=Support%20FSCalendar&amount=10%2e00¤cy_code=USD&button_subtype=services&bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHosted) +* [Have a nice dinner!](https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=Z84P82H3V4Q26&lc=C2&item_name=Tonight%27s%20dinner%20is%20on%20me%21&item_number=Support%20FSCalendar%20%2d%20WenchaoIOS&amount=25%2e00¤cy_code=USD&button_subtype=services&bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHosted) +* [Greate work! Keep the change!](https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=Z84P82H3V4Q26&lc=C2&item_name=Great%20work%21%20Keep%20the%20change%21&item_number=Support%20FSCalendar%20%2d%20WenchaoIOS&amount=100%2e00¤cy_code=USD&button_subtype=services&bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHosted) + +# License +FSCalendar is available under the MIT license. See the LICENSE file for more info. + +# Contributions +* Issues and pull requests are absolutely welcome. +* For code contributions, please follow [Coding Guidelines for Cocoa](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html) + +# Contact +* Email: `f33chobits@gmail.com` + diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/CALayer+FSExtension.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/CALayer+FSExtension.h new file mode 120000 index 0000000..dedb924 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/CALayer+FSExtension.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/CALayer+FSExtension.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendar+IBExtension.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendar+IBExtension.h new file mode 120000 index 0000000..ff3538c --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendar+IBExtension.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendar+IBExtension.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendar.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendar.h new file mode 120000 index 0000000..e3a47ad --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendar.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendar.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarAnimator.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarAnimator.h new file mode 120000 index 0000000..1294f28 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarAnimator.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarAnimator.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarAppearance.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarAppearance.h new file mode 120000 index 0000000..e17cd29 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarAppearance.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarAppearance.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarCell.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarCell.h new file mode 120000 index 0000000..636d91d --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarCell.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarCell.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarCollectionView.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarCollectionView.h new file mode 120000 index 0000000..d7f95ef --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarCollectionView.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarCollectionView.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarConstance.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarConstance.h new file mode 120000 index 0000000..2108f4f --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarConstance.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarConstance.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarDynamicHeader.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarDynamicHeader.h new file mode 120000 index 0000000..017e457 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarDynamicHeader.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarDynamicHeader.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarEventIndicator.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarEventIndicator.h new file mode 120000 index 0000000..a723e74 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarEventIndicator.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarEventIndicator.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarFlowLayout.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarFlowLayout.h new file mode 120000 index 0000000..2282fd6 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarFlowLayout.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarFlowLayout.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarHeader.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarHeader.h new file mode 120000 index 0000000..cbdffd1 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarHeader.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarHeader.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarStickyHeader.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarStickyHeader.h new file mode 120000 index 0000000..23771dd --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/FSCalendarStickyHeader.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/FSCalendarStickyHeader.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/NSDate+FSExtension.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/NSDate+FSExtension.h new file mode 120000 index 0000000..632e692 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/NSDate+FSExtension.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/NSDate+FSExtension.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/NSString+FSExtension.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/NSString+FSExtension.h new file mode 120000 index 0000000..53cfa66 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/NSString+FSExtension.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/NSString+FSExtension.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Headers/Private/FSCalendar/UIView+FSExtension.h b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/UIView+FSExtension.h new file mode 120000 index 0000000..5c16760 --- /dev/null +++ b/Verdnaturaventas/Pods/Headers/Private/FSCalendar/UIView+FSExtension.h @@ -0,0 +1 @@ +../../../FSCalendar/FSCalendar/UIView+FSExtension.h \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Manifest.lock b/Verdnaturaventas/Pods/Manifest.lock new file mode 100644 index 0000000..135149a --- /dev/null +++ b/Verdnaturaventas/Pods/Manifest.lock @@ -0,0 +1,10 @@ +PODS: + - FSCalendar (2.0.1) + +DEPENDENCIES: + - FSCalendar + +SPEC CHECKSUMS: + FSCalendar: 18117308f5876a8f6f0fe572085d543580c2c5e5 + +COCOAPODS: 0.39.0 diff --git a/Verdnaturaventas/Pods/Pods.xcodeproj/project.pbxproj b/Verdnaturaventas/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..edb7bbc --- /dev/null +++ b/Verdnaturaventas/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,628 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 078D4DF75013A50AAFBCC75467214CFB /* NSString+FSExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 57A5F764D689F517AF0A280881C6A35E /* NSString+FSExtension.m */; }; + 082C46A244A1077339875D1132DF9874 /* FSCalendarAppearance.m in Sources */ = {isa = PBXBuildFile; fileRef = 1524B94489B35EDB0193D2795F7AC857 /* FSCalendarAppearance.m */; }; + 0E44012DD097816D61C9AF7B4D509469 /* FSCalendarHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 01C90B5BA1ED973CF81DA8D2E5651F43 /* FSCalendarHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 11F20D807E923A4DBE6CDFDA9A73C229 /* FSCalendarCollectionView.h in Headers */ = {isa = PBXBuildFile; fileRef = C960DB8A2528D516D3A13FCCA82C3B66 /* FSCalendarCollectionView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21209814564B699E013C0579D7617C88 /* FSCalendarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 18D0AC9847ACFE1E70FCA1815B8B6D61 /* FSCalendarCell.m */; }; + 215F145235E6770BB3B93DD87D011579 /* Pods-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2FCE1C00460CF74F457E0093A676A834 /* FSCalendarConstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 66A12E4D5C211678B2448F9E984899B4 /* FSCalendarConstance.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 30D2A77C4197DF77DEAF13D41D97FAB1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91413329813FA6FE5A78842159E69621 /* Foundation.framework */; }; + 39582F80068C0DEF708DEE01B8C053F7 /* NSDate+FSExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 004D1A969174AF6C5B848624330800BB /* NSDate+FSExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3B202C12728218C238D98AEE659FF7D1 /* FSCalendarHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CD502FEBD83BB7C9A99531C9B8FF7AA /* FSCalendarHeader.m */; }; + 3CBF88CA2DE4F67B82C36AE6290DCC90 /* FSCalendarStickyHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FDBB92A380E152AD7BD7095E586CAA2 /* FSCalendarStickyHeader.m */; }; + 42E18A7773D704188DAE03B594B0B690 /* UIView+FSExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 6026ABDBA74287306D2C9518D545B324 /* UIView+FSExtension.m */; }; + 4814EE71271BC074621A5ABB07525ACF /* FSCalendar+IBExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D9EA616D8F785AFE57E49EB2EBB9199 /* FSCalendar+IBExtension.m */; }; + 4960C49802C172EF3469FEC6DCBC1318 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9DE615671731BF3AEFB3CB1F984FA8F /* UIKit.framework */; }; + 51D1AC1D010EA99E078E75C69C6D2111 /* FSCalendarEventIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = B17FE42DA526E38B1BAD0E640FAC0E67 /* FSCalendarEventIndicator.m */; }; + 5C88EB02C6D789D20C6298CF77049112 /* FSCalendar+IBExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A73BF15FC5F8D84C8C1E89BC5012F8B /* FSCalendar+IBExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6983260381111B42F335961452EEE2B0 /* FSCalendarFlowLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B0AF2A7CE74D14448B0D5942BDFBA33 /* FSCalendarFlowLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6C92086C1DC08BB2A45B0A66F839CA48 /* FSCalendarFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = FF20F0CC674B99CCEC0A85786BDCDB05 /* FSCalendarFlowLayout.m */; }; + 6ECD11C96CBDCA50F0331F3FBDAECE64 /* FSCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 98CD1A2A02AB1888D0D56BE327D56429 /* FSCalendar.m */; }; + 785778BB36B2F9B21FAE5E476E1B6E2E /* FSCalendarAnimator.m in Sources */ = {isa = PBXBuildFile; fileRef = F9180C6EAEB7510676867403C29B059D /* FSCalendarAnimator.m */; }; + 7A779B7652F894A80FBCAF67E3E960FA /* FSCalendar-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C87C1A5FB3D8DA8F4AD70BDA9D7B44A /* FSCalendar-dummy.m */; }; + 7E1B58C9322E8E27C3376E330C124FC7 /* CALayer+FSExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = F0D56D8E51D040808E96D623109D9677 /* CALayer+FSExtension.m */; }; + 7FE3ECFE7843570AAFAD9216E3546026 /* FSCalendarStickyHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE96FA9099CE5E9A94A75A3F757BB9E /* FSCalendarStickyHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9522DA78F08119D9EAFA3E30698BDE41 /* FSCalendarCell.h in Headers */ = {isa = PBXBuildFile; fileRef = B49CDF768CA3F6526D472C8C650B8FAC /* FSCalendarCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9EFD5A3145CC48882E4B6F6A71EE1505 /* NSDate+FSExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B885DB0B763A1DCD70285647F631796 /* NSDate+FSExtension.m */; }; + B08294E2247DE35943C7180A647EE72D /* NSString+FSExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BB28774480DA728F69EFCE55C620818 /* NSString+FSExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B4C6C827EDB0DF9F605FF4C2FA3626E0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E642B1A057ADA2ABEF90BE2417F349C1 /* QuartzCore.framework */; }; + C17B63D63425ED26125A32CC2E15B2A6 /* UIView+FSExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C016456080B824C14A47832D1EC2588 /* UIView+FSExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C60C0BAB1840ED78E320BF832EB7D90F /* CALayer+FSExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 973C6ACFE44EE61AC3EB163842687499 /* CALayer+FSExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CEBADA794147C66483B0C205EDED2F4B /* FSCalendarDynamicHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = D49228A8363C97A98756ABE725AC608C /* FSCalendarDynamicHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D4B2E79A7850584715A743A46D4EFA14 /* FSCalendarConstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C6E65A2E80A14F0FB803523C77B30C5 /* FSCalendarConstance.m */; }; + D603EE78D5DBF389EC429A33757BFF5C /* FSCalendarAppearance.h in Headers */ = {isa = PBXBuildFile; fileRef = 59A3A667EB647318A5CB7F633A9A7EE3 /* FSCalendarAppearance.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DB0D7D2A2EDB8D6D5C18B850CB779F7B /* FSCalendarCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CB0C45B63CC86C4C0837D6C3D9095F1 /* FSCalendarCollectionView.m */; }; + DE0A4E10ED1E104BF1DEF81453A6EBC8 /* FSCalendar-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AF45E441F8C6E244BCFEA866579B5C5F /* FSCalendar-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DF12D28003AF7562B560123341B2D2DB /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */; }; + E20A253E8B32E3679DD1B13844709F26 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91413329813FA6FE5A78842159E69621 /* Foundation.framework */; }; + E773A27D47BC2080FB249FBD4513AB1C /* FSCalendarAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = C0D8BCC3685C44CA28E320CCFDFC5896 /* FSCalendarAnimator.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F7317B2BAF77EC9AF9422499C1D467AA /* FSCalendarEventIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A612F8B03967A88706A41DBBCB40C2F /* FSCalendarEventIndicator.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F7944D091AD240B80D98066395A99B95 /* FSCalendar.h in Headers */ = {isa = PBXBuildFile; fileRef = CC1E62AB45C7FE4D10390474B2FDE645 /* FSCalendar.h */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 650DFB32E50AFECE1EBB68208751A584 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = B2619B2813D910DBC9FE9714E0788D55; + remoteInfo = FSCalendar; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 004D1A969174AF6C5B848624330800BB /* NSDate+FSExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSDate+FSExtension.h"; path = "FSCalendar/NSDate+FSExtension.h"; sourceTree = ""; }; + 01C90B5BA1ED973CF81DA8D2E5651F43 /* FSCalendarHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarHeader.h; path = FSCalendar/FSCalendarHeader.h; sourceTree = ""; }; + 0A612F8B03967A88706A41DBBCB40C2F /* FSCalendarEventIndicator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarEventIndicator.h; path = FSCalendar/FSCalendarEventIndicator.h; sourceTree = ""; }; + 1524B94489B35EDB0193D2795F7AC857 /* FSCalendarAppearance.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendarAppearance.m; path = FSCalendar/FSCalendarAppearance.m; sourceTree = ""; }; + 18D0AC9847ACFE1E70FCA1815B8B6D61 /* FSCalendarCell.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendarCell.m; path = FSCalendar/FSCalendarCell.m; sourceTree = ""; }; + 1BB28774480DA728F69EFCE55C620818 /* NSString+FSExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+FSExtension.h"; path = "FSCalendar/NSString+FSExtension.h"; sourceTree = ""; }; + 284826027086B1CAB0D7807EA166B824 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-umbrella.h"; sourceTree = ""; }; + 2CB0C45B63CC86C4C0837D6C3D9095F1 /* FSCalendarCollectionView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendarCollectionView.m; path = FSCalendar/FSCalendarCollectionView.m; sourceTree = ""; }; + 3B885DB0B763A1DCD70285647F631796 /* NSDate+FSExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSDate+FSExtension.m"; path = "FSCalendar/NSDate+FSExtension.m"; sourceTree = ""; }; + 3CD502FEBD83BB7C9A99531C9B8FF7AA /* FSCalendarHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendarHeader.m; path = FSCalendar/FSCalendarHeader.m; sourceTree = ""; }; + 4C016456080B824C14A47832D1EC2588 /* UIView+FSExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+FSExtension.h"; path = "FSCalendar/UIView+FSExtension.h"; sourceTree = ""; }; + 5265AB2CFE48EE9C37E365DF67299F47 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 57A5F764D689F517AF0A280881C6A35E /* NSString+FSExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+FSExtension.m"; path = "FSCalendar/NSString+FSExtension.m"; sourceTree = ""; }; + 59A3A667EB647318A5CB7F633A9A7EE3 /* FSCalendarAppearance.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarAppearance.h; path = FSCalendar/FSCalendarAppearance.h; sourceTree = ""; }; + 5C32D283AFF9767FE04FB3D27A2D93D5 /* FSCalendar.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = FSCalendar.modulemap; sourceTree = ""; }; + 6026ABDBA74287306D2C9518D545B324 /* UIView+FSExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+FSExtension.m"; path = "FSCalendar/UIView+FSExtension.m"; sourceTree = ""; }; + 66A12E4D5C211678B2448F9E984899B4 /* FSCalendarConstance.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarConstance.h; path = FSCalendar/FSCalendarConstance.h; sourceTree = ""; }; + 6C6E65A2E80A14F0FB803523C77B30C5 /* FSCalendarConstance.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendarConstance.m; path = FSCalendar/FSCalendarConstance.m; sourceTree = ""; }; + 6C87C1A5FB3D8DA8F4AD70BDA9D7B44A /* FSCalendar-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FSCalendar-dummy.m"; sourceTree = ""; }; + 79A9DEDC89FE8336BF5FEDAAF75BF7FC /* Pods.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Pods.modulemap; sourceTree = ""; }; + 7A73BF15FC5F8D84C8C1E89BC5012F8B /* FSCalendar+IBExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FSCalendar+IBExtension.h"; path = "FSCalendar/FSCalendar+IBExtension.h"; sourceTree = ""; }; + 87B213035BAC5F75386F62D3C75D2342 /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; + 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; + 91413329813FA6FE5A78842159E69621 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 973C6ACFE44EE61AC3EB163842687499 /* CALayer+FSExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CALayer+FSExtension.h"; path = "FSCalendar/CALayer+FSExtension.h"; sourceTree = ""; }; + 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; + 98CD1A2A02AB1888D0D56BE327D56429 /* FSCalendar.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendar.m; path = FSCalendar/FSCalendar.m; sourceTree = ""; }; + 9B0AF2A7CE74D14448B0D5942BDFBA33 /* FSCalendarFlowLayout.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarFlowLayout.h; path = FSCalendar/FSCalendarFlowLayout.h; sourceTree = ""; }; + 9B61826B3D452DCC3B687F30A891F0D0 /* FSCalendar-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FSCalendar-prefix.pch"; sourceTree = ""; }; + 9D9EA616D8F785AFE57E49EB2EBB9199 /* FSCalendar+IBExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "FSCalendar+IBExtension.m"; path = "FSCalendar/FSCalendar+IBExtension.m"; sourceTree = ""; }; + 9E3061880F7A3AACACCC69AB2DB69555 /* FSCalendar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FSCalendar.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9FDBB92A380E152AD7BD7095E586CAA2 /* FSCalendarStickyHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendarStickyHeader.m; path = FSCalendar/FSCalendarStickyHeader.m; sourceTree = ""; }; + AF45E441F8C6E244BCFEA866579B5C5F /* FSCalendar-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FSCalendar-umbrella.h"; sourceTree = ""; }; + B17FE42DA526E38B1BAD0E640FAC0E67 /* FSCalendarEventIndicator.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendarEventIndicator.m; path = FSCalendar/FSCalendarEventIndicator.m; sourceTree = ""; }; + B49CDF768CA3F6526D472C8C650B8FAC /* FSCalendarCell.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarCell.h; path = FSCalendar/FSCalendarCell.h; sourceTree = ""; }; + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + C0D8BCC3685C44CA28E320CCFDFC5896 /* FSCalendarAnimator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarAnimator.h; path = FSCalendar/FSCalendarAnimator.h; sourceTree = ""; }; + C960DB8A2528D516D3A13FCCA82C3B66 /* FSCalendarCollectionView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarCollectionView.h; path = FSCalendar/FSCalendarCollectionView.h; sourceTree = ""; }; + CBC0F7C552B739C909B650A0F42F7F38 /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; + CC1E62AB45C7FE4D10390474B2FDE645 /* FSCalendar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendar.h; path = FSCalendar/FSCalendar.h; sourceTree = ""; }; + D0405803033A2A777B8E4DFA0C1800ED /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; + D49228A8363C97A98756ABE725AC608C /* FSCalendarDynamicHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarDynamicHeader.h; path = FSCalendar/FSCalendarDynamicHeader.h; sourceTree = ""; }; + D9DE615671731BF3AEFB3CB1F984FA8F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; + E642B1A057ADA2ABEF90BE2417F349C1 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; + E7F21354943D9F42A70697D5A5EF72E9 /* Pods-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-frameworks.sh"; sourceTree = ""; }; + E8446514FBAD26C0E18F24A5715AEF67 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EAE96FA9099CE5E9A94A75A3F757BB9E /* FSCalendarStickyHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FSCalendarStickyHeader.h; path = FSCalendar/FSCalendarStickyHeader.h; sourceTree = ""; }; + F0D56D8E51D040808E96D623109D9677 /* CALayer+FSExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CALayer+FSExtension.m"; path = "FSCalendar/CALayer+FSExtension.m"; sourceTree = ""; }; + F9180C6EAEB7510676867403C29B059D /* FSCalendarAnimator.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendarAnimator.m; path = FSCalendar/FSCalendarAnimator.m; sourceTree = ""; }; + F964C9BC17A31A59BCDAD81259391E99 /* FSCalendar.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = FSCalendar.xcconfig; sourceTree = ""; }; + FF20F0CC674B99CCEC0A85786BDCDB05 /* FSCalendarFlowLayout.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FSCalendarFlowLayout.m; path = FSCalendar/FSCalendarFlowLayout.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 24A6EBA9EAE5017F65E804F351F8C1E0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 30D2A77C4197DF77DEAF13D41D97FAB1 /* Foundation.framework in Frameworks */, + B4C6C827EDB0DF9F605FF4C2FA3626E0 /* QuartzCore.framework in Frameworks */, + 4960C49802C172EF3469FEC6DCBC1318 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + AB7412433C3884CC52DB362959E37E08 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E20A253E8B32E3679DD1B13844709F26 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0FE21D7E9190CB8FF3DAA291EA7B46F2 /* Support Files */ = { + isa = PBXGroup; + children = ( + 5C32D283AFF9767FE04FB3D27A2D93D5 /* FSCalendar.modulemap */, + F964C9BC17A31A59BCDAD81259391E99 /* FSCalendar.xcconfig */, + 6C87C1A5FB3D8DA8F4AD70BDA9D7B44A /* FSCalendar-dummy.m */, + 9B61826B3D452DCC3B687F30A891F0D0 /* FSCalendar-prefix.pch */, + AF45E441F8C6E244BCFEA866579B5C5F /* FSCalendar-umbrella.h */, + 5265AB2CFE48EE9C37E365DF67299F47 /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/FSCalendar"; + sourceTree = ""; + }; + 122DA2E5084A4393C29BE363C764795C /* Frameworks */ = { + isa = PBXGroup; + children = ( + DA23025FEDA7F7FE2AACB2532BD80D14 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 1691A473B2A86C771E7F849527F3C2D0 /* Products */ = { + isa = PBXGroup; + children = ( + 9E3061880F7A3AACACCC69AB2DB69555 /* FSCalendar.framework */, + 284826027086B1CAB0D7807EA166B824 /* Pods.framework */, + ); + name = Products; + sourceTree = ""; + }; + 1B1414788D00FCDBBFC0ED4163A1B2E6 /* Pods */ = { + isa = PBXGroup; + children = ( + 5F7358C36BC3B85F670329793E837256 /* FSCalendar */, + ); + name = Pods; + sourceTree = ""; + }; + 5F7358C36BC3B85F670329793E837256 /* FSCalendar */ = { + isa = PBXGroup; + children = ( + 973C6ACFE44EE61AC3EB163842687499 /* CALayer+FSExtension.h */, + F0D56D8E51D040808E96D623109D9677 /* CALayer+FSExtension.m */, + CC1E62AB45C7FE4D10390474B2FDE645 /* FSCalendar.h */, + 98CD1A2A02AB1888D0D56BE327D56429 /* FSCalendar.m */, + 7A73BF15FC5F8D84C8C1E89BC5012F8B /* FSCalendar+IBExtension.h */, + 9D9EA616D8F785AFE57E49EB2EBB9199 /* FSCalendar+IBExtension.m */, + C0D8BCC3685C44CA28E320CCFDFC5896 /* FSCalendarAnimator.h */, + F9180C6EAEB7510676867403C29B059D /* FSCalendarAnimator.m */, + 59A3A667EB647318A5CB7F633A9A7EE3 /* FSCalendarAppearance.h */, + 1524B94489B35EDB0193D2795F7AC857 /* FSCalendarAppearance.m */, + B49CDF768CA3F6526D472C8C650B8FAC /* FSCalendarCell.h */, + 18D0AC9847ACFE1E70FCA1815B8B6D61 /* FSCalendarCell.m */, + C960DB8A2528D516D3A13FCCA82C3B66 /* FSCalendarCollectionView.h */, + 2CB0C45B63CC86C4C0837D6C3D9095F1 /* FSCalendarCollectionView.m */, + 66A12E4D5C211678B2448F9E984899B4 /* FSCalendarConstance.h */, + 6C6E65A2E80A14F0FB803523C77B30C5 /* FSCalendarConstance.m */, + D49228A8363C97A98756ABE725AC608C /* FSCalendarDynamicHeader.h */, + 0A612F8B03967A88706A41DBBCB40C2F /* FSCalendarEventIndicator.h */, + B17FE42DA526E38B1BAD0E640FAC0E67 /* FSCalendarEventIndicator.m */, + 9B0AF2A7CE74D14448B0D5942BDFBA33 /* FSCalendarFlowLayout.h */, + FF20F0CC674B99CCEC0A85786BDCDB05 /* FSCalendarFlowLayout.m */, + 01C90B5BA1ED973CF81DA8D2E5651F43 /* FSCalendarHeader.h */, + 3CD502FEBD83BB7C9A99531C9B8FF7AA /* FSCalendarHeader.m */, + EAE96FA9099CE5E9A94A75A3F757BB9E /* FSCalendarStickyHeader.h */, + 9FDBB92A380E152AD7BD7095E586CAA2 /* FSCalendarStickyHeader.m */, + 004D1A969174AF6C5B848624330800BB /* NSDate+FSExtension.h */, + 3B885DB0B763A1DCD70285647F631796 /* NSDate+FSExtension.m */, + 1BB28774480DA728F69EFCE55C620818 /* NSString+FSExtension.h */, + 57A5F764D689F517AF0A280881C6A35E /* NSString+FSExtension.m */, + 4C016456080B824C14A47832D1EC2588 /* UIView+FSExtension.h */, + 6026ABDBA74287306D2C9518D545B324 /* UIView+FSExtension.m */, + 0FE21D7E9190CB8FF3DAA291EA7B46F2 /* Support Files */, + ); + path = FSCalendar; + sourceTree = ""; + }; + 75D98FF52E597A11900E131B6C4E1ADA /* Pods */ = { + isa = PBXGroup; + children = ( + E8446514FBAD26C0E18F24A5715AEF67 /* Info.plist */, + 79A9DEDC89FE8336BF5FEDAAF75BF7FC /* Pods.modulemap */, + D0405803033A2A777B8E4DFA0C1800ED /* Pods-acknowledgements.markdown */, + 87B213035BAC5F75386F62D3C75D2342 /* Pods-acknowledgements.plist */, + 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */, + E7F21354943D9F42A70697D5A5EF72E9 /* Pods-frameworks.sh */, + CBC0F7C552B739C909B650A0F42F7F38 /* Pods-resources.sh */, + 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */, + 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */, + DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */, + ); + name = Pods; + path = "Target Support Files/Pods"; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, + 122DA2E5084A4393C29BE363C764795C /* Frameworks */, + 1B1414788D00FCDBBFC0ED4163A1B2E6 /* Pods */, + 1691A473B2A86C771E7F849527F3C2D0 /* Products */, + B7B80995527643776607AFFA75B91E24 /* Targets Support Files */, + ); + sourceTree = ""; + }; + B7B80995527643776607AFFA75B91E24 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 75D98FF52E597A11900E131B6C4E1ADA /* Pods */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + DA23025FEDA7F7FE2AACB2532BD80D14 /* iOS */ = { + isa = PBXGroup; + children = ( + 91413329813FA6FE5A78842159E69621 /* Foundation.framework */, + E642B1A057ADA2ABEF90BE2417F349C1 /* QuartzCore.framework */, + D9DE615671731BF3AEFB3CB1F984FA8F /* UIKit.framework */, + ); + name = iOS; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 848CAA779F22E44C4E79C91F9A46DA84 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + C60C0BAB1840ED78E320BF832EB7D90F /* CALayer+FSExtension.h in Headers */, + 5C88EB02C6D789D20C6298CF77049112 /* FSCalendar+IBExtension.h in Headers */, + DE0A4E10ED1E104BF1DEF81453A6EBC8 /* FSCalendar-umbrella.h in Headers */, + F7944D091AD240B80D98066395A99B95 /* FSCalendar.h in Headers */, + E773A27D47BC2080FB249FBD4513AB1C /* FSCalendarAnimator.h in Headers */, + D603EE78D5DBF389EC429A33757BFF5C /* FSCalendarAppearance.h in Headers */, + 9522DA78F08119D9EAFA3E30698BDE41 /* FSCalendarCell.h in Headers */, + 11F20D807E923A4DBE6CDFDA9A73C229 /* FSCalendarCollectionView.h in Headers */, + 2FCE1C00460CF74F457E0093A676A834 /* FSCalendarConstance.h in Headers */, + CEBADA794147C66483B0C205EDED2F4B /* FSCalendarDynamicHeader.h in Headers */, + F7317B2BAF77EC9AF9422499C1D467AA /* FSCalendarEventIndicator.h in Headers */, + 6983260381111B42F335961452EEE2B0 /* FSCalendarFlowLayout.h in Headers */, + 0E44012DD097816D61C9AF7B4D509469 /* FSCalendarHeader.h in Headers */, + 7FE3ECFE7843570AAFAD9216E3546026 /* FSCalendarStickyHeader.h in Headers */, + 39582F80068C0DEF708DEE01B8C053F7 /* NSDate+FSExtension.h in Headers */, + B08294E2247DE35943C7180A647EE72D /* NSString+FSExtension.h in Headers */, + C17B63D63425ED26125A32CC2E15B2A6 /* UIView+FSExtension.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FB4C9CC59F9DB94DD02038CB8A40C9A0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 215F145235E6770BB3B93DD87D011579 /* Pods-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + B2619B2813D910DBC9FE9714E0788D55 /* FSCalendar */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7E66DDA4D9ACEE4559FE14589C5F582B /* Build configuration list for PBXNativeTarget "FSCalendar" */; + buildPhases = ( + 4C57AC1B079DBD5A5910873EA4FE09F2 /* Sources */, + 24A6EBA9EAE5017F65E804F351F8C1E0 /* Frameworks */, + 848CAA779F22E44C4E79C91F9A46DA84 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FSCalendar; + productName = FSCalendar; + productReference = 9E3061880F7A3AACACCC69AB2DB69555 /* FSCalendar.framework */; + productType = "com.apple.product-type.framework"; + }; + DF9645A5A279AE409F149EBF9CA9FB28 /* Pods */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F0B6230EA55BB6A0230F67E56A65BE6 /* Build configuration list for PBXNativeTarget "Pods" */; + buildPhases = ( + FE36D06581A8E1BB3F0CC84A2024D03B /* Sources */, + AB7412433C3884CC52DB362959E37E08 /* Frameworks */, + FB4C9CC59F9DB94DD02038CB8A40C9A0 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4044EAEAEFFE9E6B3AD494967CAFE787 /* PBXTargetDependency */, + ); + name = Pods; + productName = Pods; + productReference = 284826027086B1CAB0D7807EA166B824 /* Pods.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0700; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 1691A473B2A86C771E7F849527F3C2D0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B2619B2813D910DBC9FE9714E0788D55 /* FSCalendar */, + DF9645A5A279AE409F149EBF9CA9FB28 /* Pods */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 4C57AC1B079DBD5A5910873EA4FE09F2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E1B58C9322E8E27C3376E330C124FC7 /* CALayer+FSExtension.m in Sources */, + 4814EE71271BC074621A5ABB07525ACF /* FSCalendar+IBExtension.m in Sources */, + 7A779B7652F894A80FBCAF67E3E960FA /* FSCalendar-dummy.m in Sources */, + 6ECD11C96CBDCA50F0331F3FBDAECE64 /* FSCalendar.m in Sources */, + 785778BB36B2F9B21FAE5E476E1B6E2E /* FSCalendarAnimator.m in Sources */, + 082C46A244A1077339875D1132DF9874 /* FSCalendarAppearance.m in Sources */, + 21209814564B699E013C0579D7617C88 /* FSCalendarCell.m in Sources */, + DB0D7D2A2EDB8D6D5C18B850CB779F7B /* FSCalendarCollectionView.m in Sources */, + D4B2E79A7850584715A743A46D4EFA14 /* FSCalendarConstance.m in Sources */, + 51D1AC1D010EA99E078E75C69C6D2111 /* FSCalendarEventIndicator.m in Sources */, + 6C92086C1DC08BB2A45B0A66F839CA48 /* FSCalendarFlowLayout.m in Sources */, + 3B202C12728218C238D98AEE659FF7D1 /* FSCalendarHeader.m in Sources */, + 3CBF88CA2DE4F67B82C36AE6290DCC90 /* FSCalendarStickyHeader.m in Sources */, + 9EFD5A3145CC48882E4B6F6A71EE1505 /* NSDate+FSExtension.m in Sources */, + 078D4DF75013A50AAFBCC75467214CFB /* NSString+FSExtension.m in Sources */, + 42E18A7773D704188DAE03B594B0B690 /* UIView+FSExtension.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FE36D06581A8E1BB3F0CC84A2024D03B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DF12D28003AF7562B560123341B2D2DB /* Pods-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4044EAEAEFFE9E6B3AD494967CAFE787 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FSCalendar; + target = B2619B2813D910DBC9FE9714E0788D55 /* FSCalendar */; + targetProxy = 650DFB32E50AFECE1EBB68208751A584 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 2CF1A55FBC171828E9D217DE4D88EB80 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods/Pods.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 9A358E1EBC1FE863E275D45887146F83 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F964C9BC17A31A59BCDAD81259391E99 /* FSCalendar.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/FSCalendar/FSCalendar-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FSCalendar/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FSCalendar/FSCalendar.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = FSCalendar; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 9EDB52415BA19124A1FF9CC2D068E0CB /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F964C9BC17A31A59BCDAD81259391E99 /* FSCalendar.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/FSCalendar/FSCalendar-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FSCalendar/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FSCalendar/FSCalendar.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = FSCalendar; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + A70CDAD61F90AC503C7D04CC22DA2923 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + ONLY_ACTIVE_ARCH = YES; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + B3F62574337F328339EF101FE8A1164F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods/Pods.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + FB45FFD90572718D82AB9092B750F0CA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A70CDAD61F90AC503C7D04CC22DA2923 /* Debug */, + FB45FFD90572718D82AB9092B750F0CA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F0B6230EA55BB6A0230F67E56A65BE6 /* Build configuration list for PBXNativeTarget "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B3F62574337F328339EF101FE8A1164F /* Debug */, + 2CF1A55FBC171828E9D217DE4D88EB80 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7E66DDA4D9ACEE4559FE14589C5F582B /* Build configuration list for PBXNativeTarget "FSCalendar" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9A358E1EBC1FE863E275D45887146F83 /* Debug */, + 9EDB52415BA19124A1FF9CC2D068E0CB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcschemes/xcschememanagement.plist b/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..fe04a11 --- /dev/null +++ b/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,19 @@ + + + + + SchemeUserState + + FSCalendar.xcscheme + + orderHint + 2 + + Pods.xcscheme + + orderHint + 3 + + + + diff --git a/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/FSCalendar.xcscheme b/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/FSCalendar.xcscheme new file mode 100644 index 0000000..4baab35 --- /dev/null +++ b/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/FSCalendar.xcscheme @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/Pods.xcscheme b/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/Pods.xcscheme new file mode 100644 index 0000000..0e12a94 --- /dev/null +++ b/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/Pods.xcscheme @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/xcschememanagement.plist b/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..0797045 --- /dev/null +++ b/Verdnaturaventas/Pods/Pods.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,32 @@ + + + + + SchemeUserState + + FSCalendar.xcscheme + + isShown + + + Pods.xcscheme + + isShown + + + + SuppressBuildableAutocreation + + B2619B2813D910DBC9FE9714E0788D55 + + primary + + + DF9645A5A279AE409F149EBF9CA9FB28 + + primary + + + + + diff --git a/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar-dummy.m b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar-dummy.m new file mode 100644 index 0000000..3e89702 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_FSCalendar : NSObject +@end +@implementation PodsDummy_FSCalendar +@end diff --git a/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar-prefix.pch b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar-umbrella.h b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar-umbrella.h new file mode 100644 index 0000000..09611e7 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar-umbrella.h @@ -0,0 +1,22 @@ +#import + +#import "CALayer+FSExtension.h" +#import "FSCalendar+IBExtension.h" +#import "FSCalendar.h" +#import "FSCalendarAnimator.h" +#import "FSCalendarAppearance.h" +#import "FSCalendarCell.h" +#import "FSCalendarCollectionView.h" +#import "FSCalendarConstance.h" +#import "FSCalendarDynamicHeader.h" +#import "FSCalendarEventIndicator.h" +#import "FSCalendarFlowLayout.h" +#import "FSCalendarHeader.h" +#import "FSCalendarStickyHeader.h" +#import "NSDate+FSExtension.h" +#import "NSString+FSExtension.h" +#import "UIView+FSExtension.h" + +FOUNDATION_EXPORT double FSCalendarVersionNumber; +FOUNDATION_EXPORT const unsigned char FSCalendarVersionString[]; + diff --git a/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar.modulemap b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar.modulemap new file mode 100644 index 0000000..7ff4b77 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar.modulemap @@ -0,0 +1,6 @@ +framework module FSCalendar { + umbrella header "FSCalendar-umbrella.h" + + export * + module * { export * } +} diff --git a/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar.xcconfig b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar.xcconfig new file mode 100644 index 0000000..6b079bd --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/FSCalendar.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FSCalendar" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "QuartzCore" -framework "UIKit" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Target Support Files/FSCalendar/Info.plist b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/Info.plist new file mode 100644 index 0000000..c2fdb7a --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/FSCalendar/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.0.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Info.plist b/Verdnaturaventas/Pods/Target Support Files/Pods/Info.plist new file mode 100644 index 0000000..6974542 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown new file mode 100644 index 0000000..345846d --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## FSCalendar + +Copyright (c) 2013-2016 FSCalendar (https://github.com/WenchaoIOS/FSCalendar) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Generated by CocoaPods - http://cocoapods.org diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-acknowledgements.plist new file mode 100644 index 0000000..ce7d0bc --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-acknowledgements.plist @@ -0,0 +1,56 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2013-2016 FSCalendar (https://github.com/WenchaoIOS/FSCalendar) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + Title + FSCalendar + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-dummy.m b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-dummy.m new file mode 100644 index 0000000..ade64bd --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods : NSObject +@end +@implementation PodsDummy_Pods +@end diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-frameworks.sh b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-frameworks.sh new file mode 100755 index 0000000..bc520f0 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-frameworks.sh @@ -0,0 +1,91 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "Pods/FSCalendar.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "Pods/FSCalendar.framework" +fi diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-resources.sh b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-resources.sh new file mode 100755 index 0000000..16774fb --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-resources.sh @@ -0,0 +1,95 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-umbrella.h b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-umbrella.h new file mode 100644 index 0000000..21dcfd2 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double PodsVersionNumber; +FOUNDATION_EXPORT const unsigned char PodsVersionString[]; + diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods.debug.xcconfig new file mode 100644 index 0000000..53a61a3 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods.debug.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/FSCalendar.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "FSCalendar" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Pods.modulemap b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods.modulemap new file mode 100644 index 0000000..8413413 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods.modulemap @@ -0,0 +1,6 @@ +framework module Pods { + umbrella header "Pods-umbrella.h" + + export * + module * { export * } +} diff --git a/Verdnaturaventas/Pods/Target Support Files/Pods/Pods.release.xcconfig b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods.release.xcconfig new file mode 100644 index 0000000..53a61a3 --- /dev/null +++ b/Verdnaturaventas/Pods/Target Support Files/Pods/Pods.release.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/FSCalendar.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "FSCalendar" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.pbxproj b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.pbxproj new file mode 100644 index 0000000..bd88ede --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.pbxproj @@ -0,0 +1,1766 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2E0D74F00A1BCC22C5D7FD31 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88084E26A228A358E419BD7 /* Pods.framework */; }; + A60259091C5901EB00A7695F /* CeldaArticulo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A60259081C5901EB00A7695F /* CeldaArticulo.swift */; }; + A603401F1C3FE07100BDF2ED /* Login-01.jpg in Resources */ = {isa = PBXBuildFile; fileRef = A603401D1C3FE07100BDF2ED /* Login-01.jpg */; }; + A60340201C3FE07100BDF2ED /* Login.png in Resources */ = {isa = PBXBuildFile; fileRef = A603401E1C3FE07100BDF2ED /* Login.png */; }; + A62C69681E8A44B4000BCDBC /* MyFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62C69671E8A44B4000BCDBC /* MyFileManager.swift */; }; + A62C696B1E8A6ED5000BCDBC /* CeldaLineasRecibidas.xib in Resources */ = {isa = PBXBuildFile; fileRef = A62C696A1E8A6ED5000BCDBC /* CeldaLineasRecibidas.xib */; }; + A62C696D1E8A70E4000BCDBC /* CeldaLineasRecibidas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62C696C1E8A70E4000BCDBC /* CeldaLineasRecibidas.swift */; }; + A630B94F1F30B1960029BF52 /* CeldaArticuloTags.swift in Sources */ = {isa = PBXBuildFile; fileRef = A630B94E1F30B1960029BF52 /* CeldaArticuloTags.swift */; }; + A6366C7B1C90507000EF8470 /* OFL.txt in Resources */ = {isa = PBXBuildFile; fileRef = A6366C711C90507000EF8470 /* OFL.txt */; }; + A6366C7C1C90507000EF8470 /* Raleway-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6366C721C90507000EF8470 /* Raleway-Bold.ttf */; }; + A6366C7D1C90507000EF8470 /* Raleway-ExtraBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6366C731C90507000EF8470 /* Raleway-ExtraBold.ttf */; }; + A6366C7E1C90507000EF8470 /* Raleway-ExtraLight.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6366C741C90507000EF8470 /* Raleway-ExtraLight.ttf */; }; + A6366C7F1C90507000EF8470 /* Raleway-Heavy.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6366C751C90507000EF8470 /* Raleway-Heavy.ttf */; }; + A6366C801C90507000EF8470 /* Raleway-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6366C761C90507000EF8470 /* Raleway-Light.ttf */; }; + A6366C811C90507000EF8470 /* Raleway-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6366C771C90507000EF8470 /* Raleway-Medium.ttf */; }; + A6366C821C90507000EF8470 /* Raleway-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6366C781C90507000EF8470 /* Raleway-Regular.ttf */; }; + A6366C831C90507000EF8470 /* Raleway-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6366C791C90507000EF8470 /* Raleway-SemiBold.ttf */; }; + A6366C841C90507000EF8470 /* Raleway-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6366C7A1C90507000EF8470 /* Raleway-Thin.ttf */; }; + A63D76B11C563D93009C2A16 /* disclouser.png in Resources */ = {isa = PBXBuildFile; fileRef = A63D76B01C563D93009C2A16 /* disclouser.png */; }; + A63FB0871C5B77EA00C42AF4 /* TransitionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A63FB0861C5B77EA00C42AF4 /* TransitionManager.swift */; }; + A63FB08A1C5B7EBB00C42AF4 /* ViewDetalleArticulo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A63FB0891C5B7EBB00C42AF4 /* ViewDetalleArticulo.swift */; }; + A63FB08C1C5B817700C42AF4 /* CmdObtenerArticuloVenta.swift in Sources */ = {isa = PBXBuildFile; fileRef = A63FB08B1C5B817700C42AF4 /* CmdObtenerArticuloVenta.swift */; }; + A63FB08E1C5B9A5B00C42AF4 /* CeldaBoton.xib in Resources */ = {isa = PBXBuildFile; fileRef = A63FB08D1C5B9A5B00C42AF4 /* CeldaBoton.xib */; }; + A63FB0931C5B9D0300C42AF4 /* CeldaArticulo.xib in Resources */ = {isa = PBXBuildFile; fileRef = A63FB0911C5B9D0300C42AF4 /* CeldaArticulo.xib */; }; + A63FB0941C5B9D0300C42AF4 /* CeldaBoton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A63FB0921C5B9D0300C42AF4 /* CeldaBoton.swift */; }; + A63FB0961C5B9D0F00C42AF4 /* ParserArticulo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A63FB0951C5B9D0F00C42AF4 /* ParserArticulo.swift */; }; + A64211401F2F562700DFBE10 /* CeldaArticuloTags.xib in Resources */ = {isa = PBXBuildFile; fileRef = A642113F1F2F562700DFBE10 /* CeldaArticuloTags.xib */; }; + A649B9C31C96E68400024538 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A649B9B81C96E68400024538 /* Localizable.strings */; }; + A649B9C41C96E68400024538 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A649B9BB1C96E68400024538 /* Localizable.strings */; }; + A649B9C51C96E68400024538 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A649B9BE1C96E68400024538 /* Localizable.strings */; }; + A649B9C61C96E68400024538 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A649B9C11C96E68400024538 /* Localizable.strings */; }; + A64EC3AB1E8CE58B00B7166A /* ParserTicketRecepcionLinea.swift in Sources */ = {isa = PBXBuildFile; fileRef = A64EC3AA1E8CE58B00B7166A /* ParserTicketRecepcionLinea.swift */; }; + A64EC3AE1E8D082C00B7166A /* CmdCheckMovimientos.swift in Sources */ = {isa = PBXBuildFile; fileRef = A64EC3AD1E8D082C00B7166A /* CmdCheckMovimientos.swift */; }; + A64EC3B01E8D344200B7166A /* CeldaTicketRecibido.xib in Resources */ = {isa = PBXBuildFile; fileRef = A64EC3AF1E8D344200B7166A /* CeldaTicketRecibido.xib */; }; + A64EC3B21E8D36AE00B7166A /* CeldaTicketRecibido.swift in Sources */ = {isa = PBXBuildFile; fileRef = A64EC3B11E8D36AE00B7166A /* CeldaTicketRecibido.swift */; }; + A657546F1F31AD35002FFB77 /* ItemTag.xib in Resources */ = {isa = PBXBuildFile; fileRef = A657546E1F31AD35002FFB77 /* ItemTag.xib */; }; + A65754721F31BEBA002FFB77 /* ItemTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = A65754711F31BEBA002FFB77 /* ItemTag.swift */; }; + A65F5E5D1C47A7C4004FEAE1 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = A65F5E5C1C47A7C4004FEAE1 /* Order.swift */; }; + A65F5E601C47AA6D004FEAE1 /* Agencia.swift in Sources */ = {isa = PBXBuildFile; fileRef = A65F5E5F1C47AA6D004FEAE1 /* Agencia.swift */; }; + A65F5E621C47AD72004FEAE1 /* OrderRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = A65F5E611C47AD72004FEAE1 /* OrderRow.swift */; }; + A65F5E641C47ADDE004FEAE1 /* ArticuloVentas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A65F5E631C47ADDE004FEAE1 /* ArticuloVentas.swift */; }; + A65F5E661C47AF6A004FEAE1 /* Tarifa.swift in Sources */ = {isa = PBXBuildFile; fileRef = A65F5E651C47AF6A004FEAE1 /* Tarifa.swift */; }; + A65F5E681C47AF8F004FEAE1 /* Component.swift in Sources */ = {isa = PBXBuildFile; fileRef = A65F5E671C47AF8F004FEAE1 /* Component.swift */; }; + A65F5E6B1C47B9C6004FEAE1 /* UtilDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A65F5E6A1C47B9C6004FEAE1 /* UtilDate.swift */; }; + A65F5E711C47BDF2004FEAE1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A65F5E6F1C47BDF2004FEAE1 /* LaunchScreen.storyboard */; }; + A65F5E721C47BDF2004FEAE1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A65F5E701C47BDF2004FEAE1 /* Main.storyboard */; }; + A66BFFDB1E8B9D2900776ED7 /* ViewImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66BFFDA1E8B9D2900776ED7 /* ViewImage.swift */; }; + A66EDF1C1C896FE1008EF663 /* CmdObtenerPedidos.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF1B1C896FE1008EF663 /* CmdObtenerPedidos.swift */; }; + A66EDF1E1C89709B008EF663 /* TicketRecepcion.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF1D1C89709B008EF663 /* TicketRecepcion.swift */; }; + A66EDF201C8970B6008EF663 /* TicketRecepcionLinea.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF1F1C8970B6008EF663 /* TicketRecepcionLinea.swift */; }; + A66EDF221C897284008EF663 /* ParserTicketRecepcion.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF211C897284008EF663 /* ParserTicketRecepcion.swift */; }; + A66EDF281C897661008EF663 /* ParserArrayTicketRecepcion.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF271C897661008EF663 /* ParserArrayTicketRecepcion.swift */; }; + A66EDF2A1C8977BF008EF663 /* ViewShippings.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66EDF291C8977BF008EF663 /* ViewShippings.swift */; }; + A66FEA0E1C84961B00189AE4 /* ViewChangeMail.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66FEA0D1C84961B00189AE4 /* ViewChangeMail.swift */; }; + A66FEA101C849FC900189AE4 /* CmdModificarCliente.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66FEA0F1C849FC900189AE4 /* CmdModificarCliente.swift */; }; + A66FEA121C84AF9400189AE4 /* ViewChangePassword.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66FEA111C84AF9400189AE4 /* ViewChangePassword.swift */; }; + A67278381C92F60B0059E441 /* AlertCambios.swift in Sources */ = {isa = PBXBuildFile; fileRef = A67278371C92F60B0059E441 /* AlertCambios.swift */; }; + A67499C71C7AEA2B007E2B5A /* AlertRows.swift in Sources */ = {isa = PBXBuildFile; fileRef = A67499C61C7AEA2A007E2B5A /* AlertRows.swift */; }; + A67499CA1C7AF893007E2B5A /* AlertPreciosRecalculados.swift in Sources */ = {isa = PBXBuildFile; fileRef = A67499C91C7AF893007E2B5A /* AlertPreciosRecalculados.swift */; }; + A67499CC1C7AFBB5007E2B5A /* AlertCambioPedido.swift in Sources */ = {isa = PBXBuildFile; fileRef = A67499CB1C7AFBB5007E2B5A /* AlertCambioPedido.swift */; }; + A676F1111C91496900C0D751 /* inicio_fill25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F10E1C91496900C0D751 /* inicio_fill25.png */; }; + A676F1121C91496900C0D751 /* inicio_fill50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F10F1C91496900C0D751 /* inicio_fill50.png */; }; + A676F1131C91496900C0D751 /* inicio_fill75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1101C91496900C0D751 /* inicio_fill75.png */; }; + A676F1181C914B8B00C0D751 /* carrito_fill25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1151C914B8B00C0D751 /* carrito_fill25.png */; }; + A676F1191C914B8B00C0D751 /* carrito_fill50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1161C914B8B00C0D751 /* carrito_fill50.png */; }; + A676F11A1C914B8B00C0D751 /* carrito_fill75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1171C914B8B00C0D751 /* carrito_fill75.png */; }; + A676F11E1C915CC500C0D751 /* ticB25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F11B1C915CC500C0D751 /* ticB25.png */; }; + A676F11F1C915CC500C0D751 /* ticB50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F11C1C915CC500C0D751 /* ticB50.png */; }; + A676F1201C915CC500C0D751 /* ticB75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F11D1C915CC500C0D751 /* ticB75.png */; }; + A676F12D1C917D1000C0D751 /* envios25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1211C917D1000C0D751 /* envios25.png */; }; + A676F12E1C917D1000C0D751 /* envios50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1221C917D1000C0D751 /* envios50.png */; }; + A676F12F1C917D1000C0D751 /* envios75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1231C917D1000C0D751 /* envios75.png */; }; + A676F1301C917D1000C0D751 /* mispagos25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1241C917D1000C0D751 /* mispagos25.png */; }; + A676F1311C917D1000C0D751 /* mispagos50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1251C917D1000C0D751 /* mispagos50.png */; }; + A676F1321C917D1000C0D751 /* mispagos75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1261C917D1000C0D751 /* mispagos75.png */; }; + A676F1331C917D1000C0D751 /* oculto25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1271C917D1000C0D751 /* oculto25.png */; }; + A676F1341C917D1000C0D751 /* oculto50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1281C917D1000C0D751 /* oculto50.png */; }; + A676F1351C917D1000C0D751 /* oculto75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1291C917D1000C0D751 /* oculto75.png */; }; + A676F1361C917D1000C0D751 /* salir25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F12A1C917D1000C0D751 /* salir25.png */; }; + A676F1371C917D1000C0D751 /* salir50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F12B1C917D1000C0D751 /* salir50.png */; }; + A676F1381C917D1000C0D751 /* salir75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F12C1C917D1000C0D751 /* salir75.png */; }; + A676F13C1C917F1400C0D751 /* micuenta_fill25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1391C917F1400C0D751 /* micuenta_fill25.png */; }; + A676F13D1C917F1400C0D751 /* micuenta_fill50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F13A1C917F1400C0D751 /* micuenta_fill50.png */; }; + A676F13E1C917F1400C0D751 /* micuenta_fill75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F13B1C917F1400C0D751 /* micuenta_fill75.png */; }; + A676F1451C91802C00C0D751 /* buscar_fill25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F13F1C91802C00C0D751 /* buscar_fill25.png */; }; + A676F1461C91802C00C0D751 /* buscar_fill50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1401C91802C00C0D751 /* buscar_fill50.png */; }; + A676F1471C91802C00C0D751 /* buscar_fill75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1411C91802C00C0D751 /* buscar_fill75.png */; }; + A676F1481C91802C00C0D751 /* buscar25.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1421C91802C00C0D751 /* buscar25.png */; }; + A676F1491C91802C00C0D751 /* buscar50.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1431C91802C00C0D751 /* buscar50.png */; }; + A676F14A1C91802C00C0D751 /* buscar75.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1441C91802C00C0D751 /* buscar75.png */; }; + A676F1571C9187DE00C0D751 /* 120.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1551C9187DE00C0D751 /* 120.png */; }; + A676F1581C9187DE00C0D751 /* 180.png in Resources */ = {isa = PBXBuildFile; fileRef = A676F1561C9187DE00C0D751 /* 180.png */; }; + A678A9F11C88115D001BD3BF /* AlertErrorPassword.swift in Sources */ = {isa = PBXBuildFile; fileRef = A678A9F01C88115D001BD3BF /* AlertErrorPassword.swift */; }; + A678A9F41C8819EB001BD3BF /* AlertPasswordCambiado.swift in Sources */ = {isa = PBXBuildFile; fileRef = A678A9F31C8819EB001BD3BF /* AlertPasswordCambiado.swift */; }; + A678A9F61C8820C4001BD3BF /* AlertEmailModificado.swift in Sources */ = {isa = PBXBuildFile; fileRef = A678A9F51C8820C4001BD3BF /* AlertEmailModificado.swift */; }; + A679D2901C8ED3EC0035CD77 /* DialogAgencias.swift in Sources */ = {isa = PBXBuildFile; fileRef = A679D28C1C8ED3EC0035CD77 /* DialogAgencias.swift */; }; + A679D2911C8ED3EC0035CD77 /* DialogCalendar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A679D28D1C8ED3EC0035CD77 /* DialogCalendar.swift */; }; + A679D2921C8ED3EC0035CD77 /* DialogConsignatarios.swift in Sources */ = {isa = PBXBuildFile; fileRef = A679D28E1C8ED3EC0035CD77 /* DialogConsignatarios.swift */; }; + A679D2931C8ED3EC0035CD77 /* DialogPrecios.swift in Sources */ = {isa = PBXBuildFile; fileRef = A679D28F1C8ED3EC0035CD77 /* DialogPrecios.swift */; }; + A679D2951C8EDCCC0035CD77 /* AlertStock.swift in Sources */ = {isa = PBXBuildFile; fileRef = A679D2941C8EDCCC0035CD77 /* AlertStock.swift */; }; + A679D2971C8EDEF30035CD77 /* AlertRate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A679D2961C8EDEF30035CD77 /* AlertRate.swift */; }; + A67A13EE1C73578D008A4B5C /* ViewResumenPedido.swift in Sources */ = {isa = PBXBuildFile; fileRef = A67A13ED1C73578D008A4B5C /* ViewResumenPedido.swift */; }; + A67A13F21C735D33008A4B5C /* CmdRecuperarPedido.swift in Sources */ = {isa = PBXBuildFile; fileRef = A67A13F11C735D33008A4B5C /* CmdRecuperarPedido.swift */; }; + A67B6DBB1C90290700F03F3F /* micuenta25.png in Resources */ = {isa = PBXBuildFile; fileRef = A67B6DB81C90290700F03F3F /* micuenta25.png */; }; + A67B6DBC1C90290700F03F3F /* micuenta50.png in Resources */ = {isa = PBXBuildFile; fileRef = A67B6DB91C90290700F03F3F /* micuenta50.png */; }; + A67B6DBD1C90290700F03F3F /* micuenta75.png in Resources */ = {isa = PBXBuildFile; fileRef = A67B6DBA1C90290700F03F3F /* micuenta75.png */; }; + A67B6DC21C902AE700F03F3F /* carrito25.png in Resources */ = {isa = PBXBuildFile; fileRef = A67B6DBF1C902AE700F03F3F /* carrito25.png */; }; + A67B6DC31C902AE700F03F3F /* carrito50.png in Resources */ = {isa = PBXBuildFile; fileRef = A67B6DC01C902AE700F03F3F /* carrito50.png */; }; + A67B6DC41C902AE700F03F3F /* carrito75.png in Resources */ = {isa = PBXBuildFile; fileRef = A67B6DC11C902AE700F03F3F /* carrito75.png */; }; + A67B6DC81C902D3000F03F3F /* inicio25.png in Resources */ = {isa = PBXBuildFile; fileRef = A67B6DC51C902D3000F03F3F /* inicio25.png */; }; + A67B6DC91C902D3000F03F3F /* inicio50.png in Resources */ = {isa = PBXBuildFile; fileRef = A67B6DC61C902D3000F03F3F /* inicio50.png */; }; + A67B6DCA1C902D3000F03F3F /* inicio75.png in Resources */ = {isa = PBXBuildFile; fileRef = A67B6DC71C902D3000F03F3F /* inicio75.png */; }; + A68095E91C7C3D3E00F3283C /* ViewNavegador.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68095E81C7C3D3E00F3283C /* ViewNavegador.swift */; }; + A68095EC1C7C3E0A00F3283C /* CmdObtenerDatosPasarBanco.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68095EB1C7C3E0A00F3283C /* CmdObtenerDatosPasarBanco.swift */; }; + A68095EE1C7C3EA300F3283C /* DatosPasarBanco.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68095ED1C7C3EA300F3283C /* DatosPasarBanco.swift */; }; + A68095F01C7C409900F3283C /* ParserDatosBanco.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68095EF1C7C409900F3283C /* ParserDatosBanco.swift */; }; + A68095F21C7C513200F3283C /* CmdTransactionEnd.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68095F11C7C513200F3283C /* CmdTransactionEnd.swift */; }; + A68095F41C7C67B800F3283C /* DialogValidarPedido.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68095F31C7C67B800F3283C /* DialogValidarPedido.swift */; }; + A68095F81C7C721400F3283C /* CmdObtenerCreditoRiesgo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68095F71C7C721400F3283C /* CmdObtenerCreditoRiesgo.swift */; }; + A68095FB1C7C768E00F3283C /* CmdSplitOrder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68095FA1C7C768E00F3283C /* CmdSplitOrder.swift */; }; + A6876E8F1C771045009C3C56 /* AlertAgency.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6876E8E1C771045009C3C56 /* AlertAgency.swift */; }; + A6876E911C771218009C3C56 /* AlertBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6876E901C771218009C3C56 /* AlertBase.swift */; }; + A68E7F651C75D536009ED57C /* ViewSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68E7F641C75D536009ED57C /* ViewSearch.swift */; }; + A68E7F671C75D99B009ED57C /* CmdBuscarClientes.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68E7F661C75D99B009ED57C /* CmdBuscarClientes.swift */; }; + A68E7F691C75DA5D009ED57C /* ParserArrayClientes.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68E7F681C75DA5D009ED57C /* ParserArrayClientes.swift */; }; + A68E7F6B1C760160009ED57C /* CmdObtenerClienteById.swift in Sources */ = {isa = PBXBuildFile; fileRef = A68E7F6A1C760160009ED57C /* CmdObtenerClienteById.swift */; }; + A6957DF51C844D23000A2219 /* ViewPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6957DF41C844D23000A2219 /* ViewPanel.swift */; }; + A6957DF81C8457DB000A2219 /* ViewAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6957DF71C8457DB000A2219 /* ViewAccount.swift */; }; + A69935DB1C51036200A94281 /* CeldaConsignatario.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69935DA1C51036200A94281 /* CeldaConsignatario.swift */; }; + A69935E11C510C1700A94281 /* OrderResumen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69935E01C510C1700A94281 /* OrderResumen.swift */; }; + A69935E31C510C3000A94281 /* CardImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69935E21C510C3000A94281 /* CardImage.swift */; }; + A69935E51C510C3D00A94281 /* ControllerPedido.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69935E41C510C3D00A94281 /* ControllerPedido.swift */; }; + A69935E71C510CEF00A94281 /* ParserOrderResumen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69935E61C510CEF00A94281 /* ParserOrderResumen.swift */; }; + A69935E91C510F2200A94281 /* CmdObtenerPedidosPendientes.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69935E81C510F2200A94281 /* CmdObtenerPedidosPendientes.swift */; }; + A69935EB1C51130400A94281 /* ViewListadoPedidosPendientes.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69935EA1C51130400A94281 /* ViewListadoPedidosPendientes.swift */; }; + A699684A1C8D8DD100C73440 /* ViewLineasPedido.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69968491C8D8DD100C73440 /* ViewLineasPedido.swift */; }; + A699684D1C8D9C7900C73440 /* DialogPagarDeuda.swift in Sources */ = {isa = PBXBuildFile; fileRef = A699684C1C8D9C7900C73440 /* DialogPagarDeuda.swift */; }; + A69984241C686F3F002E8CCC /* CeldaCarrito.xib in Resources */ = {isa = PBXBuildFile; fileRef = A69984231C686F3F002E8CCC /* CeldaCarrito.xib */; }; + A69984261C6871B1002E8CCC /* CeldaCarrito.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69984251C6871B1002E8CCC /* CeldaCarrito.swift */; }; + A69984281C6876CC002E8CCC /* ViewCarrito.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69984271C6876CC002E8CCC /* ViewCarrito.swift */; }; + A699842A1C68ADAE002E8CCC /* ControllerArticulo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69984291C68ADAE002E8CCC /* ControllerArticulo.swift */; }; + A69B43011C6C6FD2009F69B4 /* ParserOrder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69B43001C6C6FD2009F69B4 /* ParserOrder.swift */; }; + A69B43041C6C7E8C009F69B4 /* ParserOrderRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69B43031C6C7E8C009F69B4 /* ParserOrderRow.swift */; }; + A69CEDBB1C3A65D900482F9B /* ParserClienteVentas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69CEDBA1C3A65D900482F9B /* ParserClienteVentas.swift */; }; + A69CEDBD1C3A660800482F9B /* ClienteVentas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69CEDBC1C3A660800482F9B /* ClienteVentas.swift */; }; + A69CEDC01C3A677200482F9B /* Consignatario.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69CEDBF1C3A677200482F9B /* Consignatario.swift */; }; + A69CEDCA1C3A7B9000482F9B /* ParserConsignatario.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69CEDC91C3A7B9000482F9B /* ParserConsignatario.swift */; }; + A69CEDCC1C3A82D700482F9B /* SecurityFacade.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69CEDCB1C3A82D700482F9B /* SecurityFacade.swift */; }; + A69CEE551C3A95B800482F9B /* MyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69CEE541C3A95B800482F9B /* MyView.swift */; }; + A69CEE571C3A95E300482F9B /* ViewLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69CEE561C3A95E300482F9B /* ViewLogin.swift */; }; + A6A8EF3C1C59EB8600A5D889 /* Values.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A8EF3B1C59EB8600A5D889 /* Values.swift */; }; + A6A8EF3F1C59F0B300A5D889 /* ViewArticulos.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A8EF3E1C59F0B300A5D889 /* ViewArticulos.swift */; }; + A6A8EF431C59FAA000A5D889 /* ParserArrayArticulos.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A8EF421C59FAA000A5D889 /* ParserArrayArticulos.swift */; }; + A6A8EF451C59FB6900A5D889 /* ParserTarifa.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A8EF441C59FB6900A5D889 /* ParserTarifa.swift */; }; + A6A8EF471C5A021800A5D889 /* CmdObtenerStock.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A8EF461C5A021800A5D889 /* CmdObtenerStock.swift */; }; + A6A95AD81C4CE94E00C8559C /* CmdBuscarArticulos.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A95AD71C4CE94E00C8559C /* CmdBuscarArticulos.swift */; }; + A6A95ADB1C4CF0F500C8559C /* Vista.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A95ADA1C4CF0F500C8559C /* Vista.swift */; }; + A6A95ADD1C4CF1BF00C8559C /* ParserVistas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A95ADC1C4CF1BF00C8559C /* ParserVistas.swift */; }; + A6A95ADF1C4CF44D00C8559C /* CmdObtenerAgencias.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A95ADE1C4CF44D00C8559C /* CmdObtenerAgencias.swift */; }; + A6A95AE91C4D1C0300C8559C /* CeldaString.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6A95AE81C4D1C0300C8559C /* CeldaString.swift */; }; + A6A95AEC1C4D1D6F00C8559C /* CeldaString.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6A95AEB1C4D1D6F00C8559C /* CeldaString.xib */; }; + A6AB5A1F1C4F6E17004F068F /* carrito.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AB5A1C1C4F6E17004F068F /* carrito.png */; }; + A6AB5A271C4F9461004F068F /* artificial.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AB5A211C4F9461004F068F /* artificial.png */; }; + A6AB5A281C4F9461004F068F /* complemento.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AB5A221C4F9461004F068F /* complemento.png */; }; + A6AB5A291C4F9461004F068F /* confeccion.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AB5A231C4F9461004F068F /* confeccion.png */; }; + A6AB5A2A1C4F9461004F068F /* flor.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AB5A241C4F9461004F068F /* flor.png */; }; + A6AB5A2B1C4F9461004F068F /* planta.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AB5A251C4F9461004F068F /* planta.png */; }; + A6AB5A2C1C4F9461004F068F /* verde.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AB5A261C4F9461004F068F /* verde.png */; }; + A6AB5A331C4FBD4F004F068F /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AB5A321C4FBD4F004F068F /* CardView.swift */; }; + A6AE40551C7EE9EC00C6FE6C /* AlertItemCarrito.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AE40541C7EE9EC00C6FE6C /* AlertItemCarrito.swift */; }; + A6AE405A1C7EF17500C6FE6C /* back22.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AE40571C7EF17500C6FE6C /* back22.png */; }; + A6AE405B1C7EF17500C6FE6C /* back44.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AE40581C7EF17500C6FE6C /* back44.png */; }; + A6AE405C1C7EF17500C6FE6C /* back66.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AE40591C7EF17500C6FE6C /* back66.png */; }; + A6AE405E1C7F13D800C6FE6C /* AlertNoArticulos.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AE405D1C7F13D800C6FE6C /* AlertNoArticulos.swift */; }; + A6AE40601C7F1AAD00C6FE6C /* AlertVaciarCarrito.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AE405F1C7F1AAD00C6FE6C /* AlertVaciarCarrito.swift */; }; + A6AE40621C7F2A1800C6FE6C /* DialogFinalizarPedido.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AE40611C7F2A1800C6FE6C /* DialogFinalizarPedido.swift */; }; + A6AEC0241CABE59F00807AA3 /* noimagen-01.png in Resources */ = {isa = PBXBuildFile; fileRef = A6AEC0231CABE59F00807AA3 /* noimagen-01.png */; }; + A6AEC0271CABE75A00807AA3 /* UIImageViewAsyncVentas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AEC0261CABE75A00807AA3 /* UIImageViewAsyncVentas.swift */; }; + A6AEFF191C4504220077EB54 /* TabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AEFF181C4504220077EB54 /* TabView.swift */; }; + A6B028531C574BDF00D679EF /* CeldaImageTitle.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6B028521C574BDF00D679EF /* CeldaImageTitle.xib */; }; + A6B028561C574C8900D679EF /* CeldaImageTitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B028551C574C8900D679EF /* CeldaImageTitle.swift */; }; + A6B0285C1C578F1D00D679EF /* CeldaDobleString.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B0285B1C578F1D00D679EF /* CeldaDobleString.swift */; }; + A6B0285E1C578F4700D679EF /* CeldaDobleString.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6B0285D1C578F4700D679EF /* CeldaDobleString.xib */; }; + A6B028601C57902400D679EF /* ViewOrderResume.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B0285F1C57902400D679EF /* ViewOrderResume.swift */; }; + A6B081AE1C85879B000EEF85 /* CmdModificarPassword.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B081AD1C85879B000EEF85 /* CmdModificarPassword.swift */; }; + A6B6DED41C69F08F004FEE3B /* CircleLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B6DED31C69F08F004FEE3B /* CircleLabel.swift */; }; + A6B6E0E81C58DC550047EB04 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B6E0E71C58DC550047EB04 /* Colors.swift */; }; + A6B6E0EA1C58DD6E0047EB04 /* ViewFamilias.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B6E0E91C58DD6E0047EB04 /* ViewFamilias.swift */; }; + A6B6E0EC1C58E73F0047EB04 /* CmdObtenerTipos.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B6E0EB1C58E73F0047EB04 /* CmdObtenerTipos.swift */; }; + A6B6E0EE1C58E85C0047EB04 /* Tipo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B6E0ED1C58E85C0047EB04 /* Tipo.swift */; }; + A6B6E0F01C58E9820047EB04 /* ParserTipo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B6E0EF1C58E9820047EB04 /* ParserTipo.swift */; }; + A6B6E0F21C58EB8A0047EB04 /* ParametrosReino.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B6E0F11C58EB8A0047EB04 /* ParametrosReino.swift */; }; + A6B73A211C43EAD50084C3CE /* ControllerPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B73A201C43EAD50084C3CE /* ControllerPreferences.swift */; }; + A6B73A231C43F2100084C3CE /* ViewMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B73A221C43F2100084C3CE /* ViewMain.swift */; }; + A6BABF841C33F8A00082BADE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BABF831C33F8A00082BADE /* AppDelegate.swift */; }; + A6BABF8B1C33F8A00082BADE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A6BABF8A1C33F8A00082BADE /* Assets.xcassets */; }; + A6BABF991C33F8A00082BADE /* VerdnaturaventasTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BABF981C33F8A00082BADE /* VerdnaturaventasTests.swift */; }; + A6BABFA41C33F8A00082BADE /* VerdnaturaventasUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BABFA31C33F8A00082BADE /* VerdnaturaventasUITests.swift */; }; + A6BABFD71C33F90D0082BADE /* BaseLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6BABFD41C33F9010082BADE /* BaseLibrary.framework */; }; + A6BABFDA1C33F9360082BADE /* FacadeVentas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BABFD91C33F9360082BADE /* FacadeVentas.swift */; }; + A6BABFDE1C33F9AA0082BADE /* BaseLibrary.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A6BABFD41C33F9010082BADE /* BaseLibrary.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + A6BABFE31C33FCBC0082BADE /* FacadeVentasClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BABFE21C33FCBC0082BADE /* FacadeVentasClient.swift */; }; + A6BABFE61C3412410082BADE /* CmdLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BABFE51C3412410082BADE /* CmdLogin.swift */; }; + A6BABFE81C3414CE0082BADE /* Commands.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BABFE71C3414CE0082BADE /* Commands.swift */; }; + A6BABFEA1C3416310082BADE /* CommandBaseVentas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BABFE91C3416310082BADE /* CommandBaseVentas.swift */; }; + A6BBAC941C4E3C0600C10738 /* ParserAgencias.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BBAC931C4E3C0600C10738 /* ParserAgencias.swift */; }; + A6E3A4C01C746B09009CE806 /* CmdVerificarAgencia.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6E3A4BF1C746B09009CE806 /* CmdVerificarAgencia.swift */; }; + A6E3A4C51C7495F7009CE806 /* CeldaPrecioRecalculado.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6E3A4C41C7495F7009CE806 /* CeldaPrecioRecalculado.xib */; }; + A6E3A4C71C749782009CE806 /* CeldaPrecioRecalculado.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6E3A4C61C749782009CE806 /* CeldaPrecioRecalculado.swift */; }; + A6E3A4C91C74998E009CE806 /* OrderDiference.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6E3A4C81C74998E009CE806 /* OrderDiference.swift */; }; + A6E3A4CB1C749A85009CE806 /* CmdRecalcularPrecios.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6E3A4CA1C749A85009CE806 /* CmdRecalcularPrecios.swift */; }; + A6E3A4CD1C74ACAC009CE806 /* ViewPreciosRecalculados.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6E3A4CC1C74ACAC009CE806 /* ViewPreciosRecalculados.swift */; }; + A6F5814E1C6B11480003D27F /* cancel1.png in Resources */ = {isa = PBXBuildFile; fileRef = A6F5814A1C6B11480003D27F /* cancel1.png */; }; + A6F581511C6B11480003D27F /* Trash.png in Resources */ = {isa = PBXBuildFile; fileRef = A6F5814D1C6B11480003D27F /* Trash.png */; }; + A6F581541C6B4E8B0003D27F /* CeldaPrecios.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6F581531C6B4E8B0003D27F /* CeldaPrecios.xib */; }; + A6F581561C6B50AE0003D27F /* CeldaPrecios.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6F581551C6B50AE0003D27F /* CeldaPrecios.swift */; }; + A6F581581C6B6AF50003D27F /* DatosCompra.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6F581571C6B6AF50003D27F /* DatosCompra.swift */; }; + A6F5815A1C6B76BA0003D27F /* CmdCrearOrder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6F581591C6B76BA0003D27F /* CmdCrearOrder.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + A6BABF951C33F8A00082BADE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A6BABF781C33F8A00082BADE /* Project object */; + proxyType = 1; + remoteGlobalIDString = A6BABF7F1C33F8A00082BADE; + remoteInfo = Verdnaturaventas; + }; + A6BABFA01C33F8A00082BADE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A6BABF781C33F8A00082BADE /* Project object */; + proxyType = 1; + remoteGlobalIDString = A6BABF7F1C33F8A00082BADE; + remoteInfo = Verdnaturaventas; + }; + A6BABFD31C33F9010082BADE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A6BABFCE1C33F9000082BADE /* BaseLibrary.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A6BABF531C33F80B0082BADE; + remoteInfo = BaseLibrary; + }; + A6BABFD51C33F9010082BADE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A6BABFCE1C33F9000082BADE /* BaseLibrary.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A6BABF5D1C33F80B0082BADE; + remoteInfo = BaseLibraryTests; + }; + A6BABFDB1C33F98D0082BADE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A6BABFCE1C33F9000082BADE /* BaseLibrary.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A6BABF521C33F80B0082BADE; + remoteInfo = BaseLibrary; + }; + A6BABFDF1C33F9AA0082BADE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A6BABFCE1C33F9000082BADE /* BaseLibrary.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A6BABF521C33F80B0082BADE; + remoteInfo = BaseLibrary; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + A6BABFE11C33F9AA0082BADE /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + A6BABFDE1C33F9AA0082BADE /* BaseLibrary.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 7E3B7176697597B33B41997D /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 99526864B48B202434FA66B1 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + A60259081C5901EB00A7695F /* CeldaArticulo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaArticulo.swift; path = Celdas/CeldaArticulo.swift; sourceTree = ""; }; + A603401D1C3FE07100BDF2ED /* Login-01.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = "Login-01.jpg"; path = "Images/Login-01.jpg"; sourceTree = ""; }; + A603401E1C3FE07100BDF2ED /* Login.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Login.png; path = Images/Login.png; sourceTree = ""; }; + A62C69671E8A44B4000BCDBC /* MyFileManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MyFileManager.swift; path = Core/MyFileManager.swift; sourceTree = ""; }; + A62C696A1E8A6ED5000BCDBC /* CeldaLineasRecibidas.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaLineasRecibidas.xib; path = Celdas/CeldaLineasRecibidas.xib; sourceTree = ""; }; + A62C696C1E8A70E4000BCDBC /* CeldaLineasRecibidas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaLineasRecibidas.swift; path = Celdas/CeldaLineasRecibidas.swift; sourceTree = ""; }; + A630B94E1F30B1960029BF52 /* CeldaArticuloTags.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaArticuloTags.swift; path = Celdas/CeldaArticuloTags.swift; sourceTree = ""; }; + A6366C711C90507000EF8470 /* OFL.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OFL.txt; sourceTree = ""; }; + A6366C721C90507000EF8470 /* Raleway-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Raleway-Bold.ttf"; sourceTree = ""; }; + A6366C731C90507000EF8470 /* Raleway-ExtraBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Raleway-ExtraBold.ttf"; sourceTree = ""; }; + A6366C741C90507000EF8470 /* Raleway-ExtraLight.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Raleway-ExtraLight.ttf"; sourceTree = ""; }; + A6366C751C90507000EF8470 /* Raleway-Heavy.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Raleway-Heavy.ttf"; sourceTree = ""; }; + A6366C761C90507000EF8470 /* Raleway-Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Raleway-Light.ttf"; sourceTree = ""; }; + A6366C771C90507000EF8470 /* Raleway-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Raleway-Medium.ttf"; sourceTree = ""; }; + A6366C781C90507000EF8470 /* Raleway-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Raleway-Regular.ttf"; sourceTree = ""; }; + A6366C791C90507000EF8470 /* Raleway-SemiBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Raleway-SemiBold.ttf"; sourceTree = ""; }; + A6366C7A1C90507000EF8470 /* Raleway-Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Raleway-Thin.ttf"; sourceTree = ""; }; + A63D76B01C563D93009C2A16 /* disclouser.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = disclouser.png; path = Images/disclouser.png; sourceTree = ""; }; + A63FB0861C5B77EA00C42AF4 /* TransitionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TransitionManager.swift; path = Core/TransitionManager.swift; sourceTree = ""; }; + A63FB0891C5B7EBB00C42AF4 /* ViewDetalleArticulo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewDetalleArticulo.swift; path = Views/ViewDetalleArticulo.swift; sourceTree = ""; }; + A63FB08B1C5B817700C42AF4 /* CmdObtenerArticuloVenta.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdObtenerArticuloVenta.swift; path = Command/CmdObtenerArticuloVenta.swift; sourceTree = ""; }; + A63FB08D1C5B9A5B00C42AF4 /* CeldaBoton.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaBoton.xib; path = Celdas/CeldaBoton.xib; sourceTree = ""; }; + A63FB0911C5B9D0300C42AF4 /* CeldaArticulo.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaArticulo.xib; path = Celdas/CeldaArticulo.xib; sourceTree = ""; }; + A63FB0921C5B9D0300C42AF4 /* CeldaBoton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaBoton.swift; path = Celdas/CeldaBoton.swift; sourceTree = ""; }; + A63FB0951C5B9D0F00C42AF4 /* ParserArticulo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserArticulo.swift; path = Parser/ParserArticulo.swift; sourceTree = ""; }; + A642113F1F2F562700DFBE10 /* CeldaArticuloTags.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaArticuloTags.xib; path = Celdas/CeldaArticuloTags.xib; sourceTree = ""; }; + A649B9B91C96E68400024538 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = Localizable.strings; sourceTree = ""; }; + A649B9BC1C96E68400024538 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Localizable.strings; sourceTree = ""; }; + A649B9BF1C96E68400024538 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Localizable.strings; sourceTree = ""; }; + A649B9C21C96E68400024538 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = Localizable.strings; sourceTree = ""; }; + A64EC3AA1E8CE58B00B7166A /* ParserTicketRecepcionLinea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserTicketRecepcionLinea.swift; path = Parser/ParserTicketRecepcionLinea.swift; sourceTree = ""; }; + A64EC3AD1E8D082C00B7166A /* CmdCheckMovimientos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdCheckMovimientos.swift; path = Command/CmdCheckMovimientos.swift; sourceTree = ""; }; + A64EC3AF1E8D344200B7166A /* CeldaTicketRecibido.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaTicketRecibido.xib; path = Celdas/CeldaTicketRecibido.xib; sourceTree = ""; }; + A64EC3B11E8D36AE00B7166A /* CeldaTicketRecibido.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaTicketRecibido.swift; path = Celdas/CeldaTicketRecibido.swift; sourceTree = ""; }; + A657546E1F31AD35002FFB77 /* ItemTag.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ItemTag.xib; path = Core/ItemTag.xib; sourceTree = ""; }; + A65754711F31BEBA002FFB77 /* ItemTag.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ItemTag.swift; path = Core/ItemTag.swift; sourceTree = ""; }; + A65F5E5C1C47A7C4004FEAE1 /* Order.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Order.swift; path = Model/Order.swift; sourceTree = ""; }; + A65F5E5F1C47AA6D004FEAE1 /* Agencia.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Agencia.swift; path = Model/Agencia.swift; sourceTree = ""; }; + A65F5E611C47AD72004FEAE1 /* OrderRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OrderRow.swift; path = Model/OrderRow.swift; sourceTree = ""; }; + A65F5E631C47ADDE004FEAE1 /* ArticuloVentas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ArticuloVentas.swift; path = Model/ArticuloVentas.swift; sourceTree = ""; }; + A65F5E651C47AF6A004FEAE1 /* Tarifa.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Tarifa.swift; path = Model/Tarifa.swift; sourceTree = ""; }; + A65F5E671C47AF8F004FEAE1 /* Component.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Component.swift; path = Model/Component.swift; sourceTree = ""; }; + A65F5E6A1C47B9C6004FEAE1 /* UtilDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UtilDate.swift; path = Util/UtilDate.swift; sourceTree = ""; }; + A65F5E6F1C47BDF2004FEAE1 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + A65F5E701C47BDF2004FEAE1 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; + A66BFFDA1E8B9D2900776ED7 /* ViewImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewImage.swift; path = Views/ViewImage.swift; sourceTree = ""; }; + A66EDF1B1C896FE1008EF663 /* CmdObtenerPedidos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdObtenerPedidos.swift; path = Command/CmdObtenerPedidos.swift; sourceTree = ""; }; + A66EDF1D1C89709B008EF663 /* TicketRecepcion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TicketRecepcion.swift; path = Model/TicketRecepcion.swift; sourceTree = ""; }; + A66EDF1F1C8970B6008EF663 /* TicketRecepcionLinea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TicketRecepcionLinea.swift; path = Model/TicketRecepcionLinea.swift; sourceTree = ""; }; + A66EDF211C897284008EF663 /* ParserTicketRecepcion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserTicketRecepcion.swift; path = Parser/ParserTicketRecepcion.swift; sourceTree = ""; }; + A66EDF271C897661008EF663 /* ParserArrayTicketRecepcion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserArrayTicketRecepcion.swift; path = Parser/ParserArrayTicketRecepcion.swift; sourceTree = ""; }; + A66EDF291C8977BF008EF663 /* ViewShippings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewShippings.swift; path = Views/ViewShippings.swift; sourceTree = ""; }; + A66FEA0D1C84961B00189AE4 /* ViewChangeMail.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewChangeMail.swift; path = Views/ViewPanel/ViewChangeMail.swift; sourceTree = ""; }; + A66FEA0F1C849FC900189AE4 /* CmdModificarCliente.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdModificarCliente.swift; path = Command/CmdModificarCliente.swift; sourceTree = ""; }; + A66FEA111C84AF9400189AE4 /* ViewChangePassword.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewChangePassword.swift; path = Views/ViewChangePassword.swift; sourceTree = ""; }; + A67278371C92F60B0059E441 /* AlertCambios.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertCambios.swift; path = Alerts/AlertCambios.swift; sourceTree = ""; }; + A67499C61C7AEA2A007E2B5A /* AlertRows.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertRows.swift; path = Alerts/AlertRows.swift; sourceTree = ""; }; + A67499C91C7AF893007E2B5A /* AlertPreciosRecalculados.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertPreciosRecalculados.swift; path = Alerts/AlertPreciosRecalculados.swift; sourceTree = ""; }; + A67499CB1C7AFBB5007E2B5A /* AlertCambioPedido.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertCambioPedido.swift; path = Alerts/AlertCambioPedido.swift; sourceTree = ""; }; + A676F10E1C91496900C0D751 /* inicio_fill25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = inicio_fill25.png; path = Images/inicio_fill25.png; sourceTree = ""; }; + A676F10F1C91496900C0D751 /* inicio_fill50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = inicio_fill50.png; path = Images/inicio_fill50.png; sourceTree = ""; }; + A676F1101C91496900C0D751 /* inicio_fill75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = inicio_fill75.png; path = Images/inicio_fill75.png; sourceTree = ""; }; + A676F1151C914B8B00C0D751 /* carrito_fill25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = carrito_fill25.png; path = Images/carrito_fill25.png; sourceTree = ""; }; + A676F1161C914B8B00C0D751 /* carrito_fill50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = carrito_fill50.png; path = Images/carrito_fill50.png; sourceTree = ""; }; + A676F1171C914B8B00C0D751 /* carrito_fill75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = carrito_fill75.png; path = Images/carrito_fill75.png; sourceTree = ""; }; + A676F11B1C915CC500C0D751 /* ticB25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ticB25.png; path = Images/ticB25.png; sourceTree = ""; }; + A676F11C1C915CC500C0D751 /* ticB50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ticB50.png; path = Images/ticB50.png; sourceTree = ""; }; + A676F11D1C915CC500C0D751 /* ticB75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ticB75.png; path = Images/ticB75.png; sourceTree = ""; }; + A676F1211C917D1000C0D751 /* envios25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = envios25.png; path = Images/envios25.png; sourceTree = ""; }; + A676F1221C917D1000C0D751 /* envios50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = envios50.png; path = Images/envios50.png; sourceTree = ""; }; + A676F1231C917D1000C0D751 /* envios75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = envios75.png; path = Images/envios75.png; sourceTree = ""; }; + A676F1241C917D1000C0D751 /* mispagos25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mispagos25.png; path = Images/mispagos25.png; sourceTree = ""; }; + A676F1251C917D1000C0D751 /* mispagos50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mispagos50.png; path = Images/mispagos50.png; sourceTree = ""; }; + A676F1261C917D1000C0D751 /* mispagos75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mispagos75.png; path = Images/mispagos75.png; sourceTree = ""; }; + A676F1271C917D1000C0D751 /* oculto25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = oculto25.png; path = Images/oculto25.png; sourceTree = ""; }; + A676F1281C917D1000C0D751 /* oculto50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = oculto50.png; path = Images/oculto50.png; sourceTree = ""; }; + A676F1291C917D1000C0D751 /* oculto75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = oculto75.png; path = Images/oculto75.png; sourceTree = ""; }; + A676F12A1C917D1000C0D751 /* salir25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = salir25.png; path = Images/salir25.png; sourceTree = ""; }; + A676F12B1C917D1000C0D751 /* salir50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = salir50.png; path = Images/salir50.png; sourceTree = ""; }; + A676F12C1C917D1000C0D751 /* salir75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = salir75.png; path = Images/salir75.png; sourceTree = ""; }; + A676F1391C917F1400C0D751 /* micuenta_fill25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = micuenta_fill25.png; path = Images/micuenta_fill25.png; sourceTree = ""; }; + A676F13A1C917F1400C0D751 /* micuenta_fill50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = micuenta_fill50.png; path = Images/micuenta_fill50.png; sourceTree = ""; }; + A676F13B1C917F1400C0D751 /* micuenta_fill75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = micuenta_fill75.png; path = Images/micuenta_fill75.png; sourceTree = ""; }; + A676F13F1C91802C00C0D751 /* buscar_fill25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = buscar_fill25.png; path = Images/buscar_fill25.png; sourceTree = ""; }; + A676F1401C91802C00C0D751 /* buscar_fill50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = buscar_fill50.png; path = Images/buscar_fill50.png; sourceTree = ""; }; + A676F1411C91802C00C0D751 /* buscar_fill75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = buscar_fill75.png; path = Images/buscar_fill75.png; sourceTree = ""; }; + A676F1421C91802C00C0D751 /* buscar25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = buscar25.png; path = Images/buscar25.png; sourceTree = ""; }; + A676F1431C91802C00C0D751 /* buscar50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = buscar50.png; path = Images/buscar50.png; sourceTree = ""; }; + A676F1441C91802C00C0D751 /* buscar75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = buscar75.png; path = Images/buscar75.png; sourceTree = ""; }; + A676F1551C9187DE00C0D751 /* 120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = 120.png; path = Images/120.png; sourceTree = ""; }; + A676F1561C9187DE00C0D751 /* 180.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = 180.png; path = Images/180.png; sourceTree = ""; }; + A677BF781C61F0F400100429 /* Pruebas.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Pruebas.playground; sourceTree = ""; }; + A678A9F01C88115D001BD3BF /* AlertErrorPassword.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertErrorPassword.swift; path = Alerts/AlertErrorPassword.swift; sourceTree = ""; }; + A678A9F31C8819EB001BD3BF /* AlertPasswordCambiado.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertPasswordCambiado.swift; path = Alerts/AlertPasswordCambiado.swift; sourceTree = ""; }; + A678A9F51C8820C4001BD3BF /* AlertEmailModificado.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertEmailModificado.swift; path = Alerts/AlertEmailModificado.swift; sourceTree = ""; }; + A679D28C1C8ED3EC0035CD77 /* DialogAgencias.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DialogAgencias.swift; path = Dialog/DialogAgencias.swift; sourceTree = ""; }; + A679D28D1C8ED3EC0035CD77 /* DialogCalendar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DialogCalendar.swift; path = Dialog/DialogCalendar.swift; sourceTree = ""; }; + A679D28E1C8ED3EC0035CD77 /* DialogConsignatarios.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DialogConsignatarios.swift; path = Dialog/DialogConsignatarios.swift; sourceTree = ""; }; + A679D28F1C8ED3EC0035CD77 /* DialogPrecios.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DialogPrecios.swift; path = Dialog/DialogPrecios.swift; sourceTree = ""; }; + A679D2941C8EDCCC0035CD77 /* AlertStock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertStock.swift; path = Alerts/AlertStock.swift; sourceTree = ""; }; + A679D2961C8EDEF30035CD77 /* AlertRate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertRate.swift; path = Alerts/AlertRate.swift; sourceTree = ""; }; + A67A13ED1C73578D008A4B5C /* ViewResumenPedido.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewResumenPedido.swift; path = Views/ViewResumenPedido.swift; sourceTree = ""; }; + A67A13F11C735D33008A4B5C /* CmdRecuperarPedido.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdRecuperarPedido.swift; path = Command/CmdRecuperarPedido.swift; sourceTree = ""; }; + A67B6DB81C90290700F03F3F /* micuenta25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = micuenta25.png; path = Images/micuenta25.png; sourceTree = ""; }; + A67B6DB91C90290700F03F3F /* micuenta50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = micuenta50.png; path = Images/micuenta50.png; sourceTree = ""; }; + A67B6DBA1C90290700F03F3F /* micuenta75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = micuenta75.png; path = Images/micuenta75.png; sourceTree = ""; }; + A67B6DBF1C902AE700F03F3F /* carrito25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = carrito25.png; path = Images/carrito25.png; sourceTree = ""; }; + A67B6DC01C902AE700F03F3F /* carrito50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = carrito50.png; path = Images/carrito50.png; sourceTree = ""; }; + A67B6DC11C902AE700F03F3F /* carrito75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = carrito75.png; path = Images/carrito75.png; sourceTree = ""; }; + A67B6DC51C902D3000F03F3F /* inicio25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = inicio25.png; path = Images/inicio25.png; sourceTree = ""; }; + A67B6DC61C902D3000F03F3F /* inicio50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = inicio50.png; path = Images/inicio50.png; sourceTree = ""; }; + A67B6DC71C902D3000F03F3F /* inicio75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = inicio75.png; path = Images/inicio75.png; sourceTree = ""; }; + A68095E81C7C3D3E00F3283C /* ViewNavegador.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewNavegador.swift; path = Views/ViewNavegador.swift; sourceTree = ""; }; + A68095EB1C7C3E0A00F3283C /* CmdObtenerDatosPasarBanco.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdObtenerDatosPasarBanco.swift; path = Command/CmdObtenerDatosPasarBanco.swift; sourceTree = ""; }; + A68095ED1C7C3EA300F3283C /* DatosPasarBanco.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DatosPasarBanco.swift; path = Model/DatosPasarBanco.swift; sourceTree = ""; }; + A68095EF1C7C409900F3283C /* ParserDatosBanco.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserDatosBanco.swift; path = Parser/ParserDatosBanco.swift; sourceTree = ""; }; + A68095F11C7C513200F3283C /* CmdTransactionEnd.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdTransactionEnd.swift; path = Command/CmdTransactionEnd.swift; sourceTree = ""; }; + A68095F31C7C67B800F3283C /* DialogValidarPedido.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DialogValidarPedido.swift; path = Dialog/DialogValidarPedido.swift; sourceTree = ""; }; + A68095F71C7C721400F3283C /* CmdObtenerCreditoRiesgo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdObtenerCreditoRiesgo.swift; path = Command/CmdObtenerCreditoRiesgo.swift; sourceTree = ""; }; + A68095FA1C7C768E00F3283C /* CmdSplitOrder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdSplitOrder.swift; path = Command/CmdSplitOrder.swift; sourceTree = ""; }; + A6876E8E1C771045009C3C56 /* AlertAgency.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertAgency.swift; path = Alerts/AlertAgency.swift; sourceTree = ""; }; + A6876E901C771218009C3C56 /* AlertBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertBase.swift; path = Alerts/AlertBase.swift; sourceTree = ""; }; + A68E7F611C75A18E009ED57C /* EVReflection.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EVReflection.framework; path = "Pods/../build/Debug-iphoneos/EVReflection.framework"; sourceTree = ""; }; + A68E7F641C75D536009ED57C /* ViewSearch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewSearch.swift; path = Views/ViewSearch.swift; sourceTree = ""; }; + A68E7F661C75D99B009ED57C /* CmdBuscarClientes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdBuscarClientes.swift; path = Command/CmdBuscarClientes.swift; sourceTree = ""; }; + A68E7F681C75DA5D009ED57C /* ParserArrayClientes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserArrayClientes.swift; path = Parser/ParserArrayClientes.swift; sourceTree = ""; }; + A68E7F6A1C760160009ED57C /* CmdObtenerClienteById.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdObtenerClienteById.swift; path = Command/CmdObtenerClienteById.swift; sourceTree = ""; }; + A6957DF41C844D23000A2219 /* ViewPanel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewPanel.swift; path = Views/ViewPanel.swift; sourceTree = ""; }; + A6957DF71C8457DB000A2219 /* ViewAccount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewAccount.swift; path = Views/ViewAccount.swift; sourceTree = ""; }; + A69935DA1C51036200A94281 /* CeldaConsignatario.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaConsignatario.swift; path = Celdas/CeldaConsignatario.swift; sourceTree = ""; }; + A69935E01C510C1700A94281 /* OrderResumen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OrderResumen.swift; path = Model/OrderResumen.swift; sourceTree = ""; }; + A69935E21C510C3000A94281 /* CardImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CardImage.swift; path = Core/CardImage.swift; sourceTree = ""; }; + A69935E41C510C3D00A94281 /* ControllerPedido.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ControllerPedido.swift; path = Controller/ControllerPedido.swift; sourceTree = ""; }; + A69935E61C510CEF00A94281 /* ParserOrderResumen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserOrderResumen.swift; path = Parser/ParserOrderResumen.swift; sourceTree = ""; }; + A69935E81C510F2200A94281 /* CmdObtenerPedidosPendientes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdObtenerPedidosPendientes.swift; path = Command/CmdObtenerPedidosPendientes.swift; sourceTree = ""; }; + A69935EA1C51130400A94281 /* ViewListadoPedidosPendientes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewListadoPedidosPendientes.swift; path = Views/ViewListadoPedidosPendientes.swift; sourceTree = ""; }; + A69968491C8D8DD100C73440 /* ViewLineasPedido.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewLineasPedido.swift; path = Views/ViewLineasPedido.swift; sourceTree = ""; }; + A699684C1C8D9C7900C73440 /* DialogPagarDeuda.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DialogPagarDeuda.swift; path = Dialog/DialogPagarDeuda.swift; sourceTree = ""; }; + A69984231C686F3F002E8CCC /* CeldaCarrito.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaCarrito.xib; path = Celdas/CeldaCarrito.xib; sourceTree = ""; }; + A69984251C6871B1002E8CCC /* CeldaCarrito.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaCarrito.swift; path = Celdas/CeldaCarrito.swift; sourceTree = ""; }; + A69984271C6876CC002E8CCC /* ViewCarrito.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewCarrito.swift; path = Views/ViewCarrito.swift; sourceTree = ""; }; + A69984291C68ADAE002E8CCC /* ControllerArticulo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ControllerArticulo.swift; path = Controller/ControllerArticulo.swift; sourceTree = ""; }; + A69B43001C6C6FD2009F69B4 /* ParserOrder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserOrder.swift; path = Parser/ParserOrder.swift; sourceTree = ""; }; + A69B43031C6C7E8C009F69B4 /* ParserOrderRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserOrderRow.swift; path = Parser/ParserOrderRow.swift; sourceTree = ""; }; + A69CEDBA1C3A65D900482F9B /* ParserClienteVentas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserClienteVentas.swift; path = Parser/ParserClienteVentas.swift; sourceTree = ""; }; + A69CEDBC1C3A660800482F9B /* ClienteVentas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ClienteVentas.swift; path = Model/ClienteVentas.swift; sourceTree = ""; }; + A69CEDBF1C3A677200482F9B /* Consignatario.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Consignatario.swift; path = Model/Consignatario.swift; sourceTree = ""; }; + A69CEDC91C3A7B9000482F9B /* ParserConsignatario.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserConsignatario.swift; path = Parser/ParserConsignatario.swift; sourceTree = ""; }; + A69CEDCB1C3A82D700482F9B /* SecurityFacade.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SecurityFacade.swift; path = Facade/SecurityFacade.swift; sourceTree = ""; }; + A69CEE541C3A95B800482F9B /* MyView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MyView.swift; path = Views/MyView.swift; sourceTree = ""; }; + A69CEE561C3A95E300482F9B /* ViewLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewLogin.swift; path = Views/ViewLogin.swift; sourceTree = ""; }; + A6A8EF3B1C59EB8600A5D889 /* Values.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Values.swift; path = Static/Values.swift; sourceTree = ""; }; + A6A8EF3E1C59F0B300A5D889 /* ViewArticulos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewArticulos.swift; path = Views/ViewArticulos.swift; sourceTree = ""; }; + A6A8EF421C59FAA000A5D889 /* ParserArrayArticulos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserArrayArticulos.swift; path = Parser/ParserArrayArticulos.swift; sourceTree = ""; }; + A6A8EF441C59FB6900A5D889 /* ParserTarifa.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserTarifa.swift; path = Parser/ParserTarifa.swift; sourceTree = ""; }; + A6A8EF461C5A021800A5D889 /* CmdObtenerStock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdObtenerStock.swift; path = Command/CmdObtenerStock.swift; sourceTree = ""; }; + A6A95AD71C4CE94E00C8559C /* CmdBuscarArticulos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdBuscarArticulos.swift; path = Command/CmdBuscarArticulos.swift; sourceTree = ""; }; + A6A95ADA1C4CF0F500C8559C /* Vista.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Vista.swift; path = Model/Vista.swift; sourceTree = ""; }; + A6A95ADC1C4CF1BF00C8559C /* ParserVistas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserVistas.swift; path = Parser/ParserVistas.swift; sourceTree = ""; }; + A6A95ADE1C4CF44D00C8559C /* CmdObtenerAgencias.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdObtenerAgencias.swift; path = Command/CmdObtenerAgencias.swift; sourceTree = ""; }; + A6A95AE81C4D1C0300C8559C /* CeldaString.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaString.swift; path = Celdas/CeldaString.swift; sourceTree = ""; }; + A6A95AEB1C4D1D6F00C8559C /* CeldaString.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaString.xib; path = Celdas/CeldaString.xib; sourceTree = ""; }; + A6AB5A1C1C4F6E17004F068F /* carrito.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = carrito.png; path = Images/carrito.png; sourceTree = ""; }; + A6AB5A211C4F9461004F068F /* artificial.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = artificial.png; path = Images/artificial.png; sourceTree = ""; }; + A6AB5A221C4F9461004F068F /* complemento.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = complemento.png; path = Images/complemento.png; sourceTree = ""; }; + A6AB5A231C4F9461004F068F /* confeccion.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = confeccion.png; path = Images/confeccion.png; sourceTree = ""; }; + A6AB5A241C4F9461004F068F /* flor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = flor.png; path = Images/flor.png; sourceTree = ""; }; + A6AB5A251C4F9461004F068F /* planta.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = planta.png; path = Images/planta.png; sourceTree = ""; }; + A6AB5A261C4F9461004F068F /* verde.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = verde.png; path = Images/verde.png; sourceTree = ""; }; + A6AB5A321C4FBD4F004F068F /* CardView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CardView.swift; path = Core/CardView.swift; sourceTree = ""; }; + A6AE40541C7EE9EC00C6FE6C /* AlertItemCarrito.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertItemCarrito.swift; path = Alerts/AlertItemCarrito.swift; sourceTree = ""; }; + A6AE40571C7EF17500C6FE6C /* back22.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = back22.png; path = Images/back22.png; sourceTree = ""; }; + A6AE40581C7EF17500C6FE6C /* back44.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = back44.png; path = Images/back44.png; sourceTree = ""; }; + A6AE40591C7EF17500C6FE6C /* back66.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = back66.png; path = Images/back66.png; sourceTree = ""; }; + A6AE405D1C7F13D800C6FE6C /* AlertNoArticulos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertNoArticulos.swift; path = Alerts/AlertNoArticulos.swift; sourceTree = ""; }; + A6AE405F1C7F1AAD00C6FE6C /* AlertVaciarCarrito.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlertVaciarCarrito.swift; path = Alerts/AlertVaciarCarrito.swift; sourceTree = ""; }; + A6AE40611C7F2A1800C6FE6C /* DialogFinalizarPedido.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DialogFinalizarPedido.swift; path = Dialog/DialogFinalizarPedido.swift; sourceTree = ""; }; + A6AEC0231CABE59F00807AA3 /* noimagen-01.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "noimagen-01.png"; path = "Images/noimagen-01.png"; sourceTree = ""; }; + A6AEC0261CABE75A00807AA3 /* UIImageViewAsyncVentas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UIImageViewAsyncVentas.swift; path = Core/UIImageViewAsyncVentas.swift; sourceTree = ""; }; + A6AEFF181C4504220077EB54 /* TabView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TabView.swift; path = Views/TabView.swift; sourceTree = ""; }; + A6B028521C574BDF00D679EF /* CeldaImageTitle.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaImageTitle.xib; path = Celdas/CeldaImageTitle.xib; sourceTree = ""; }; + A6B028551C574C8900D679EF /* CeldaImageTitle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaImageTitle.swift; path = Celdas/CeldaImageTitle.swift; sourceTree = ""; }; + A6B0285B1C578F1D00D679EF /* CeldaDobleString.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaDobleString.swift; path = Celdas/CeldaDobleString.swift; sourceTree = ""; }; + A6B0285D1C578F4700D679EF /* CeldaDobleString.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaDobleString.xib; path = Celdas/CeldaDobleString.xib; sourceTree = ""; }; + A6B0285F1C57902400D679EF /* ViewOrderResume.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "\U0010ViewOrderResume.swift"; path = "Views/\U0010ViewOrderResume.swift"; sourceTree = ""; }; + A6B081AD1C85879B000EEF85 /* CmdModificarPassword.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdModificarPassword.swift; path = Command/CmdModificarPassword.swift; sourceTree = ""; }; + A6B6DED31C69F08F004FEE3B /* CircleLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CircleLabel.swift; path = Core/CircleLabel.swift; sourceTree = ""; }; + A6B6E0E71C58DC550047EB04 /* Colors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Colors.swift; path = Static/Colors.swift; sourceTree = ""; }; + A6B6E0E91C58DD6E0047EB04 /* ViewFamilias.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewFamilias.swift; path = Views/ViewFamilias.swift; sourceTree = ""; }; + A6B6E0EB1C58E73F0047EB04 /* CmdObtenerTipos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdObtenerTipos.swift; path = Command/CmdObtenerTipos.swift; sourceTree = ""; }; + A6B6E0ED1C58E85C0047EB04 /* Tipo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Tipo.swift; path = Model/Tipo.swift; sourceTree = ""; }; + A6B6E0EF1C58E9820047EB04 /* ParserTipo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserTipo.swift; path = Parser/ParserTipo.swift; sourceTree = ""; }; + A6B6E0F11C58EB8A0047EB04 /* ParametrosReino.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParametrosReino.swift; path = Model/ParametrosReino.swift; sourceTree = ""; }; + A6B73A201C43EAD50084C3CE /* ControllerPreferences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ControllerPreferences.swift; path = Controller/ControllerPreferences.swift; sourceTree = ""; }; + A6B73A221C43F2100084C3CE /* ViewMain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewMain.swift; path = Views/ViewMain.swift; sourceTree = ""; }; + A6BABF801C33F8A00082BADE /* Verdnaturaventas.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Verdnaturaventas.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A6BABF831C33F8A00082BADE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A6BABF8A1C33F8A00082BADE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A6BABF8F1C33F8A00082BADE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A6BABF941C33F8A00082BADE /* VerdnaturaventasTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VerdnaturaventasTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + A6BABF981C33F8A00082BADE /* VerdnaturaventasTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VerdnaturaventasTests.swift; sourceTree = ""; }; + A6BABF9A1C33F8A00082BADE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A6BABF9F1C33F8A00082BADE /* VerdnaturaventasUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VerdnaturaventasUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + A6BABFA31C33F8A00082BADE /* VerdnaturaventasUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VerdnaturaventasUITests.swift; sourceTree = ""; }; + A6BABFA51C33F8A00082BADE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A6BABFCE1C33F9000082BADE /* BaseLibrary.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = BaseLibrary.xcodeproj; path = ../BaseLibrary/BaseLibrary.xcodeproj; sourceTree = ""; }; + A6BABFD91C33F9360082BADE /* FacadeVentas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FacadeVentas.swift; path = Facade/FacadeVentas.swift; sourceTree = ""; }; + A6BABFE21C33FCBC0082BADE /* FacadeVentasClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FacadeVentasClient.swift; path = Facade/FacadeVentasClient.swift; sourceTree = ""; }; + A6BABFE51C3412410082BADE /* CmdLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdLogin.swift; path = Command/CmdLogin.swift; sourceTree = ""; }; + A6BABFE71C3414CE0082BADE /* Commands.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Commands.swift; path = Facade/Commands.swift; sourceTree = ""; }; + A6BABFE91C3416310082BADE /* CommandBaseVentas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CommandBaseVentas.swift; path = Command/CommandBaseVentas.swift; sourceTree = ""; }; + A6BBAC931C4E3C0600C10738 /* ParserAgencias.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ParserAgencias.swift; path = Parser/ParserAgencias.swift; sourceTree = ""; }; + A6E3A4BF1C746B09009CE806 /* CmdVerificarAgencia.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdVerificarAgencia.swift; path = Command/CmdVerificarAgencia.swift; sourceTree = ""; }; + A6E3A4C41C7495F7009CE806 /* CeldaPrecioRecalculado.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaPrecioRecalculado.xib; path = Celdas/CeldaPrecioRecalculado.xib; sourceTree = ""; }; + A6E3A4C61C749782009CE806 /* CeldaPrecioRecalculado.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaPrecioRecalculado.swift; path = Celdas/CeldaPrecioRecalculado.swift; sourceTree = ""; }; + A6E3A4C81C74998E009CE806 /* OrderDiference.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OrderDiference.swift; path = Model/OrderDiference.swift; sourceTree = ""; }; + A6E3A4CA1C749A85009CE806 /* CmdRecalcularPrecios.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdRecalcularPrecios.swift; path = Command/CmdRecalcularPrecios.swift; sourceTree = ""; }; + A6E3A4CC1C74ACAC009CE806 /* ViewPreciosRecalculados.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewPreciosRecalculados.swift; path = Views/ViewPreciosRecalculados.swift; sourceTree = ""; }; + A6F5814A1C6B11480003D27F /* cancel1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = cancel1.png; path = Images/cancel1.png; sourceTree = ""; }; + A6F5814D1C6B11480003D27F /* Trash.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Trash.png; path = Images/Trash.png; sourceTree = ""; }; + A6F581531C6B4E8B0003D27F /* CeldaPrecios.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CeldaPrecios.xib; path = Celdas/CeldaPrecios.xib; sourceTree = ""; }; + A6F581551C6B50AE0003D27F /* CeldaPrecios.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CeldaPrecios.swift; path = Celdas/CeldaPrecios.swift; sourceTree = ""; }; + A6F581571C6B6AF50003D27F /* DatosCompra.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DatosCompra.swift; path = Model/DatosCompra.swift; sourceTree = ""; }; + A6F581591C6B76BA0003D27F /* CmdCrearOrder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CmdCrearOrder.swift; path = Command/CmdCrearOrder.swift; sourceTree = ""; }; + D88084E26A228A358E419BD7 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A6BABF7D1C33F8A00082BADE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A6BABFD71C33F90D0082BADE /* BaseLibrary.framework in Frameworks */, + 2E0D74F00A1BCC22C5D7FD31 /* Pods.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A6BABF911C33F8A00082BADE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A6BABF9C1C33F8A00082BADE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 56E782CA5E1B7AB8B51DE749 /* Frameworks */ = { + isa = PBXGroup; + children = ( + A68E7F611C75A18E009ED57C /* EVReflection.framework */, + D88084E26A228A358E419BD7 /* Pods.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + A6366C6F1C90507000EF8470 /* Fonts */ = { + isa = PBXGroup; + children = ( + A6366C701C90507000EF8470 /* raleway */, + ); + path = Fonts; + sourceTree = ""; + }; + A6366C701C90507000EF8470 /* raleway */ = { + isa = PBXGroup; + children = ( + A6366C711C90507000EF8470 /* OFL.txt */, + A6366C721C90507000EF8470 /* Raleway-Bold.ttf */, + A6366C731C90507000EF8470 /* Raleway-ExtraBold.ttf */, + A6366C741C90507000EF8470 /* Raleway-ExtraLight.ttf */, + A6366C751C90507000EF8470 /* Raleway-Heavy.ttf */, + A6366C761C90507000EF8470 /* Raleway-Light.ttf */, + A6366C771C90507000EF8470 /* Raleway-Medium.ttf */, + A6366C781C90507000EF8470 /* Raleway-Regular.ttf */, + A6366C791C90507000EF8470 /* Raleway-SemiBold.ttf */, + A6366C7A1C90507000EF8470 /* Raleway-Thin.ttf */, + ); + path = raleway; + sourceTree = ""; + }; + A649B9B71C96E68400024538 /* ca.lproj */ = { + isa = PBXGroup; + children = ( + A649B9B81C96E68400024538 /* Localizable.strings */, + ); + name = ca.lproj; + path = Strings/ca.lproj; + sourceTree = ""; + }; + A649B9BA1C96E68400024538 /* en.lproj */ = { + isa = PBXGroup; + children = ( + A649B9BB1C96E68400024538 /* Localizable.strings */, + ); + name = en.lproj; + path = Strings/en.lproj; + sourceTree = ""; + }; + A649B9BD1C96E68400024538 /* es.lproj */ = { + isa = PBXGroup; + children = ( + A649B9BE1C96E68400024538 /* Localizable.strings */, + ); + name = es.lproj; + path = Strings/es.lproj; + sourceTree = ""; + }; + A649B9C01C96E68400024538 /* pt.lproj */ = { + isa = PBXGroup; + children = ( + A649B9C11C96E68400024538 /* Localizable.strings */, + ); + name = pt.lproj; + path = Strings/pt.lproj; + sourceTree = ""; + }; + A65F5E691C47B9A8004FEAE1 /* Util */ = { + isa = PBXGroup; + children = ( + A65F5E6A1C47B9C6004FEAE1 /* UtilDate.swift */, + ); + name = Util; + sourceTree = ""; + }; + A66FEA0B1C8490F600189AE4 /* ViewPanel */ = { + isa = PBXGroup; + children = ( + A66FEA0D1C84961B00189AE4 /* ViewChangeMail.swift */, + A66FEA111C84AF9400189AE4 /* ViewChangePassword.swift */, + ); + name = ViewPanel; + sourceTree = ""; + }; + A68095F51C7C67C900F3283C /* Dialog */ = { + isa = PBXGroup; + children = ( + A679D28C1C8ED3EC0035CD77 /* DialogAgencias.swift */, + A679D28D1C8ED3EC0035CD77 /* DialogCalendar.swift */, + A679D28E1C8ED3EC0035CD77 /* DialogConsignatarios.swift */, + A679D28F1C8ED3EC0035CD77 /* DialogPrecios.swift */, + A68095F31C7C67B800F3283C /* DialogValidarPedido.swift */, + A6AE40611C7F2A1800C6FE6C /* DialogFinalizarPedido.swift */, + A699684C1C8D9C7900C73440 /* DialogPagarDeuda.swift */, + ); + name = Dialog; + sourceTree = ""; + }; + A6876E8C1C77102B009C3C56 /* Alerts */ = { + isa = PBXGroup; + children = ( + A6876E901C771218009C3C56 /* AlertBase.swift */, + A6876E8E1C771045009C3C56 /* AlertAgency.swift */, + A67499C61C7AEA2A007E2B5A /* AlertRows.swift */, + A67499C91C7AF893007E2B5A /* AlertPreciosRecalculados.swift */, + A67499CB1C7AFBB5007E2B5A /* AlertCambioPedido.swift */, + A6AE40541C7EE9EC00C6FE6C /* AlertItemCarrito.swift */, + A6AE405D1C7F13D800C6FE6C /* AlertNoArticulos.swift */, + A6AE405F1C7F1AAD00C6FE6C /* AlertVaciarCarrito.swift */, + A678A9F01C88115D001BD3BF /* AlertErrorPassword.swift */, + A678A9F31C8819EB001BD3BF /* AlertPasswordCambiado.swift */, + A678A9F51C8820C4001BD3BF /* AlertEmailModificado.swift */, + A679D2941C8EDCCC0035CD77 /* AlertStock.swift */, + A679D2961C8EDEF30035CD77 /* AlertRate.swift */, + A67278371C92F60B0059E441 /* AlertCambios.swift */, + ); + name = Alerts; + sourceTree = ""; + }; + A69935D71C50D09A00A94281 /* Base */ = { + isa = PBXGroup; + children = ( + A6AEFF181C4504220077EB54 /* TabView.swift */, + A69CEE541C3A95B800482F9B /* MyView.swift */, + ); + name = Base; + sourceTree = ""; + }; + A69CEDB91C3A65BA00482F9B /* Parser */ = { + isa = PBXGroup; + children = ( + A63FB0951C5B9D0F00C42AF4 /* ParserArticulo.swift */, + A69CEDBA1C3A65D900482F9B /* ParserClienteVentas.swift */, + A69CEDC91C3A7B9000482F9B /* ParserConsignatario.swift */, + A6A95ADC1C4CF1BF00C8559C /* ParserVistas.swift */, + A6BBAC931C4E3C0600C10738 /* ParserAgencias.swift */, + A69935E61C510CEF00A94281 /* ParserOrderResumen.swift */, + A6B6E0EF1C58E9820047EB04 /* ParserTipo.swift */, + A6A8EF421C59FAA000A5D889 /* ParserArrayArticulos.swift */, + A6A8EF441C59FB6900A5D889 /* ParserTarifa.swift */, + A69B43001C6C6FD2009F69B4 /* ParserOrder.swift */, + A69B43031C6C7E8C009F69B4 /* ParserOrderRow.swift */, + A68E7F681C75DA5D009ED57C /* ParserArrayClientes.swift */, + A68095EF1C7C409900F3283C /* ParserDatosBanco.swift */, + A66EDF211C897284008EF663 /* ParserTicketRecepcion.swift */, + A66EDF271C897661008EF663 /* ParserArrayTicketRecepcion.swift */, + A64EC3AA1E8CE58B00B7166A /* ParserTicketRecepcionLinea.swift */, + ); + name = Parser; + sourceTree = ""; + }; + A69CEDBE1C3A673400482F9B /* Model */ = { + isa = PBXGroup; + children = ( + A65F5E5F1C47AA6D004FEAE1 /* Agencia.swift */, + A65F5E631C47ADDE004FEAE1 /* ArticuloVentas.swift */, + A69CEDBC1C3A660800482F9B /* ClienteVentas.swift */, + A65F5E671C47AF8F004FEAE1 /* Component.swift */, + A69CEDBF1C3A677200482F9B /* Consignatario.swift */, + A65F5E5C1C47A7C4004FEAE1 /* Order.swift */, + A69935E01C510C1700A94281 /* OrderResumen.swift */, + A65F5E611C47AD72004FEAE1 /* OrderRow.swift */, + A65F5E651C47AF6A004FEAE1 /* Tarifa.swift */, + A6A95ADA1C4CF0F500C8559C /* Vista.swift */, + A6B6E0ED1C58E85C0047EB04 /* Tipo.swift */, + A6B6E0F11C58EB8A0047EB04 /* ParametrosReino.swift */, + A6F581571C6B6AF50003D27F /* DatosCompra.swift */, + A6E3A4C81C74998E009CE806 /* OrderDiference.swift */, + A68095ED1C7C3EA300F3283C /* DatosPasarBanco.swift */, + A66EDF1D1C89709B008EF663 /* TicketRecepcion.swift */, + A66EDF1F1C8970B6008EF663 /* TicketRecepcionLinea.swift */, + ); + name = Model; + sourceTree = ""; + }; + A69CEDCD1C3A92CA00482F9B /* Images */ = { + isa = PBXGroup; + children = ( + A6AEC0231CABE59F00807AA3 /* noimagen-01.png */, + A676F1551C9187DE00C0D751 /* 120.png */, + A676F1561C9187DE00C0D751 /* 180.png */, + A676F13F1C91802C00C0D751 /* buscar_fill25.png */, + A676F1401C91802C00C0D751 /* buscar_fill50.png */, + A676F1411C91802C00C0D751 /* buscar_fill75.png */, + A676F1421C91802C00C0D751 /* buscar25.png */, + A676F1431C91802C00C0D751 /* buscar50.png */, + A676F1441C91802C00C0D751 /* buscar75.png */, + A676F1391C917F1400C0D751 /* micuenta_fill25.png */, + A676F13A1C917F1400C0D751 /* micuenta_fill50.png */, + A676F13B1C917F1400C0D751 /* micuenta_fill75.png */, + A676F1211C917D1000C0D751 /* envios25.png */, + A676F1221C917D1000C0D751 /* envios50.png */, + A676F1231C917D1000C0D751 /* envios75.png */, + A676F1241C917D1000C0D751 /* mispagos25.png */, + A676F1251C917D1000C0D751 /* mispagos50.png */, + A676F1261C917D1000C0D751 /* mispagos75.png */, + A676F1271C917D1000C0D751 /* oculto25.png */, + A676F1281C917D1000C0D751 /* oculto50.png */, + A676F1291C917D1000C0D751 /* oculto75.png */, + A676F12A1C917D1000C0D751 /* salir25.png */, + A676F12B1C917D1000C0D751 /* salir50.png */, + A676F12C1C917D1000C0D751 /* salir75.png */, + A676F11B1C915CC500C0D751 /* ticB25.png */, + A676F11C1C915CC500C0D751 /* ticB50.png */, + A676F11D1C915CC500C0D751 /* ticB75.png */, + A676F1151C914B8B00C0D751 /* carrito_fill25.png */, + A676F1161C914B8B00C0D751 /* carrito_fill50.png */, + A676F1171C914B8B00C0D751 /* carrito_fill75.png */, + A676F10E1C91496900C0D751 /* inicio_fill25.png */, + A676F10F1C91496900C0D751 /* inicio_fill50.png */, + A676F1101C91496900C0D751 /* inicio_fill75.png */, + A67B6DC51C902D3000F03F3F /* inicio25.png */, + A67B6DC61C902D3000F03F3F /* inicio50.png */, + A67B6DC71C902D3000F03F3F /* inicio75.png */, + A67B6DBF1C902AE700F03F3F /* carrito25.png */, + A67B6DC01C902AE700F03F3F /* carrito50.png */, + A67B6DC11C902AE700F03F3F /* carrito75.png */, + A67B6DB81C90290700F03F3F /* micuenta25.png */, + A67B6DB91C90290700F03F3F /* micuenta50.png */, + A67B6DBA1C90290700F03F3F /* micuenta75.png */, + A6AE40571C7EF17500C6FE6C /* back22.png */, + A6AE40581C7EF17500C6FE6C /* back44.png */, + A6AE40591C7EF17500C6FE6C /* back66.png */, + A6F5814A1C6B11480003D27F /* cancel1.png */, + A6F5814D1C6B11480003D27F /* Trash.png */, + A63D76B01C563D93009C2A16 /* disclouser.png */, + A6AB5A211C4F9461004F068F /* artificial.png */, + A6AB5A221C4F9461004F068F /* complemento.png */, + A6AB5A231C4F9461004F068F /* confeccion.png */, + A6AB5A241C4F9461004F068F /* flor.png */, + A6AB5A251C4F9461004F068F /* planta.png */, + A6AB5A261C4F9461004F068F /* verde.png */, + A6AB5A1C1C4F6E17004F068F /* carrito.png */, + A603401D1C3FE07100BDF2ED /* Login-01.jpg */, + A603401E1C3FE07100BDF2ED /* Login.png */, + ); + name = Images; + sourceTree = ""; + }; + A69CEE531C3A95A300482F9B /* Views */ = { + isa = PBXGroup; + children = ( + A69935D71C50D09A00A94281 /* Base */, + A66FEA0B1C8490F600189AE4 /* ViewPanel */, + A69935EA1C51130400A94281 /* ViewListadoPedidosPendientes.swift */, + A69CEE561C3A95E300482F9B /* ViewLogin.swift */, + A6B73A221C43F2100084C3CE /* ViewMain.swift */, + A6B0285F1C57902400D679EF /* ViewOrderResume.swift */, + A6B6E0E91C58DD6E0047EB04 /* ViewFamilias.swift */, + A6A8EF3E1C59F0B300A5D889 /* ViewArticulos.swift */, + A63FB0891C5B7EBB00C42AF4 /* ViewDetalleArticulo.swift */, + A69984271C6876CC002E8CCC /* ViewCarrito.swift */, + A67A13ED1C73578D008A4B5C /* ViewResumenPedido.swift */, + A6E3A4CC1C74ACAC009CE806 /* ViewPreciosRecalculados.swift */, + A68E7F641C75D536009ED57C /* ViewSearch.swift */, + A68095E81C7C3D3E00F3283C /* ViewNavegador.swift */, + A6957DF41C844D23000A2219 /* ViewPanel.swift */, + A6957DF71C8457DB000A2219 /* ViewAccount.swift */, + A66EDF291C8977BF008EF663 /* ViewShippings.swift */, + A69968491C8D8DD100C73440 /* ViewLineasPedido.swift */, + A66BFFDA1E8B9D2900776ED7 /* ViewImage.swift */, + ); + name = Views; + sourceTree = ""; + }; + A69CEE5C1C3AAAF900482F9B /* Strings */ = { + isa = PBXGroup; + children = ( + A649B9B71C96E68400024538 /* ca.lproj */, + A649B9BA1C96E68400024538 /* en.lproj */, + A649B9BD1C96E68400024538 /* es.lproj */, + A649B9C01C96E68400024538 /* pt.lproj */, + ); + name = Strings; + sourceTree = ""; + }; + A69CEE5E1C3AAAFF00482F9B /* Resources */ = { + isa = PBXGroup; + children = ( + A6366C6F1C90507000EF8470 /* Fonts */, + A69CEDCD1C3A92CA00482F9B /* Images */, + A69CEE5C1C3AAAF900482F9B /* Strings */, + A6B6E0E51C58DC2D0047EB04 /* Static */, + ); + name = Resources; + sourceTree = ""; + }; + A6A95AE51C4D1AAE00C8559C /* Celdas */ = { + isa = PBXGroup; + children = ( + A60259081C5901EB00A7695F /* CeldaArticulo.swift */, + A63FB0911C5B9D0300C42AF4 /* CeldaArticulo.xib */, + A63FB0921C5B9D0300C42AF4 /* CeldaBoton.swift */, + A63FB08D1C5B9A5B00C42AF4 /* CeldaBoton.xib */, + A69935DA1C51036200A94281 /* CeldaConsignatario.swift */, + A6B0285B1C578F1D00D679EF /* CeldaDobleString.swift */, + A6B0285D1C578F4700D679EF /* CeldaDobleString.xib */, + A6B028551C574C8900D679EF /* CeldaImageTitle.swift */, + A6B028521C574BDF00D679EF /* CeldaImageTitle.xib */, + A6A95AE81C4D1C0300C8559C /* CeldaString.swift */, + A6A95AEB1C4D1D6F00C8559C /* CeldaString.xib */, + A69984231C686F3F002E8CCC /* CeldaCarrito.xib */, + A69984251C6871B1002E8CCC /* CeldaCarrito.swift */, + A6F581531C6B4E8B0003D27F /* CeldaPrecios.xib */, + A6F581551C6B50AE0003D27F /* CeldaPrecios.swift */, + A6E3A4C41C7495F7009CE806 /* CeldaPrecioRecalculado.xib */, + A6E3A4C61C749782009CE806 /* CeldaPrecioRecalculado.swift */, + A62C696A1E8A6ED5000BCDBC /* CeldaLineasRecibidas.xib */, + A62C696C1E8A70E4000BCDBC /* CeldaLineasRecibidas.swift */, + A64EC3AF1E8D344200B7166A /* CeldaTicketRecibido.xib */, + A64EC3B11E8D36AE00B7166A /* CeldaTicketRecibido.swift */, + A642113F1F2F562700DFBE10 /* CeldaArticuloTags.xib */, + A630B94E1F30B1960029BF52 /* CeldaArticuloTags.swift */, + ); + name = Celdas; + sourceTree = ""; + }; + A6AB5A311C4FBD2A004F068F /* Core */ = { + isa = PBXGroup; + children = ( + A69935E21C510C3000A94281 /* CardImage.swift */, + A6AB5A321C4FBD4F004F068F /* CardView.swift */, + A63FB0861C5B77EA00C42AF4 /* TransitionManager.swift */, + A6B6DED31C69F08F004FEE3B /* CircleLabel.swift */, + A6AEC0261CABE75A00807AA3 /* UIImageViewAsyncVentas.swift */, + A62C69671E8A44B4000BCDBC /* MyFileManager.swift */, + A657546E1F31AD35002FFB77 /* ItemTag.xib */, + A65754711F31BEBA002FFB77 /* ItemTag.swift */, + ); + name = Core; + sourceTree = ""; + }; + A6B6E0E51C58DC2D0047EB04 /* Static */ = { + isa = PBXGroup; + children = ( + A6B6E0E71C58DC550047EB04 /* Colors.swift */, + A6A8EF3B1C59EB8600A5D889 /* Values.swift */, + ); + name = Static; + sourceTree = ""; + }; + A6B73A1E1C43EA720084C3CE /* Controller */ = { + isa = PBXGroup; + children = ( + A69935E41C510C3D00A94281 /* ControllerPedido.swift */, + A6B73A201C43EAD50084C3CE /* ControllerPreferences.swift */, + A69984291C68ADAE002E8CCC /* ControllerArticulo.swift */, + ); + name = Controller; + sourceTree = ""; + }; + A6BABF771C33F8A00082BADE = { + isa = PBXGroup; + children = ( + A6BABFCE1C33F9000082BADE /* BaseLibrary.xcodeproj */, + 56E782CA5E1B7AB8B51DE749 /* Frameworks */, + C5CFAE020BA80A08A82A3E4F /* Pods */, + A6BABF811C33F8A00082BADE /* Products */, + A6BABF821C33F8A00082BADE /* Verdnaturaventas */, + A6BABF971C33F8A00082BADE /* VerdnaturaventasTests */, + A6BABFA21C33F8A00082BADE /* VerdnaturaventasUITests */, + ); + sourceTree = ""; + }; + A6BABF811C33F8A00082BADE /* Products */ = { + isa = PBXGroup; + children = ( + A6BABF801C33F8A00082BADE /* Verdnaturaventas.app */, + A6BABF941C33F8A00082BADE /* VerdnaturaventasTests.xctest */, + A6BABF9F1C33F8A00082BADE /* VerdnaturaventasUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + A6BABF821C33F8A00082BADE /* Verdnaturaventas */ = { + isa = PBXGroup; + children = ( + A677BF781C61F0F400100429 /* Pruebas.playground */, + A6BABF8F1C33F8A00082BADE /* Info.plist */, + A65F5E6F1C47BDF2004FEAE1 /* LaunchScreen.storyboard */, + A65F5E701C47BDF2004FEAE1 /* Main.storyboard */, + A6BABF831C33F8A00082BADE /* AppDelegate.swift */, + A6BABF8A1C33F8A00082BADE /* Assets.xcassets */, + A6876E8C1C77102B009C3C56 /* Alerts */, + A6A95AE51C4D1AAE00C8559C /* Celdas */, + A6BABFE41C3412220082BADE /* Command */, + A6B73A1E1C43EA720084C3CE /* Controller */, + A6AB5A311C4FBD2A004F068F /* Core */, + A68095F51C7C67C900F3283C /* Dialog */, + A6BABFD81C33F9190082BADE /* Facade */, + A69CEDBE1C3A673400482F9B /* Model */, + A69CEDB91C3A65BA00482F9B /* Parser */, + A69CEE5E1C3AAAFF00482F9B /* Resources */, + A65F5E691C47B9A8004FEAE1 /* Util */, + A69CEE531C3A95A300482F9B /* Views */, + ); + path = Verdnaturaventas; + sourceTree = ""; + }; + A6BABF971C33F8A00082BADE /* VerdnaturaventasTests */ = { + isa = PBXGroup; + children = ( + A6BABF981C33F8A00082BADE /* VerdnaturaventasTests.swift */, + A6BABF9A1C33F8A00082BADE /* Info.plist */, + ); + path = VerdnaturaventasTests; + sourceTree = ""; + }; + A6BABFA21C33F8A00082BADE /* VerdnaturaventasUITests */ = { + isa = PBXGroup; + children = ( + A6BABFA31C33F8A00082BADE /* VerdnaturaventasUITests.swift */, + A6BABFA51C33F8A00082BADE /* Info.plist */, + ); + path = VerdnaturaventasUITests; + sourceTree = ""; + }; + A6BABFCF1C33F9000082BADE /* Products */ = { + isa = PBXGroup; + children = ( + A6BABFD41C33F9010082BADE /* BaseLibrary.framework */, + A6BABFD61C33F9010082BADE /* BaseLibraryTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + A6BABFD81C33F9190082BADE /* Facade */ = { + isa = PBXGroup; + children = ( + A6BABFD91C33F9360082BADE /* FacadeVentas.swift */, + A6BABFE21C33FCBC0082BADE /* FacadeVentasClient.swift */, + A6BABFE71C3414CE0082BADE /* Commands.swift */, + A69CEDCB1C3A82D700482F9B /* SecurityFacade.swift */, + ); + name = Facade; + sourceTree = ""; + }; + A6BABFE41C3412220082BADE /* Command */ = { + isa = PBXGroup; + children = ( + A6A95AD71C4CE94E00C8559C /* CmdBuscarArticulos.swift */, + A68E7F661C75D99B009ED57C /* CmdBuscarClientes.swift */, + A6F581591C6B76BA0003D27F /* CmdCrearOrder.swift */, + A6BABFE51C3412410082BADE /* CmdLogin.swift */, + A66FEA0F1C849FC900189AE4 /* CmdModificarCliente.swift */, + A6B081AD1C85879B000EEF85 /* CmdModificarPassword.swift */, + A6A95ADE1C4CF44D00C8559C /* CmdObtenerAgencias.swift */, + A63FB08B1C5B817700C42AF4 /* CmdObtenerArticuloVenta.swift */, + A68E7F6A1C760160009ED57C /* CmdObtenerClienteById.swift */, + A68095F71C7C721400F3283C /* CmdObtenerCreditoRiesgo.swift */, + A68095EB1C7C3E0A00F3283C /* CmdObtenerDatosPasarBanco.swift */, + A69935E81C510F2200A94281 /* CmdObtenerPedidosPendientes.swift */, + A6A8EF461C5A021800A5D889 /* CmdObtenerStock.swift */, + A6B6E0EB1C58E73F0047EB04 /* CmdObtenerTipos.swift */, + A6E3A4CA1C749A85009CE806 /* CmdRecalcularPrecios.swift */, + A67A13F11C735D33008A4B5C /* CmdRecuperarPedido.swift */, + A68095FA1C7C768E00F3283C /* CmdSplitOrder.swift */, + A68095F11C7C513200F3283C /* CmdTransactionEnd.swift */, + A6E3A4BF1C746B09009CE806 /* CmdVerificarAgencia.swift */, + A6BABFE91C3416310082BADE /* CommandBaseVentas.swift */, + A66EDF1B1C896FE1008EF663 /* CmdObtenerPedidos.swift */, + A64EC3AD1E8D082C00B7166A /* CmdCheckMovimientos.swift */, + ); + name = Command; + sourceTree = ""; + }; + C5CFAE020BA80A08A82A3E4F /* Pods */ = { + isa = PBXGroup; + children = ( + 7E3B7176697597B33B41997D /* Pods.debug.xcconfig */, + 99526864B48B202434FA66B1 /* Pods.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A6BABF7F1C33F8A00082BADE /* Verdnaturaventas */ = { + isa = PBXNativeTarget; + buildConfigurationList = A6BABFA81C33F8A00082BADE /* Build configuration list for PBXNativeTarget "Verdnaturaventas" */; + buildPhases = ( + AF02D8DB6E6B1D118A959FA5 /* Check Pods Manifest.lock */, + A6BABF7C1C33F8A00082BADE /* Sources */, + A6BABF7D1C33F8A00082BADE /* Frameworks */, + A6BABF7E1C33F8A00082BADE /* Resources */, + A6BABFE11C33F9AA0082BADE /* Embed Frameworks */, + 54259F0919E1254B694028C9 /* Embed Pods Frameworks */, + A9A92DCF155DDF5F6A7878A2 /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + A6BABFDC1C33F98D0082BADE /* PBXTargetDependency */, + A6BABFE01C33F9AA0082BADE /* PBXTargetDependency */, + ); + name = Verdnaturaventas; + productName = Verdnaturaventas; + productReference = A6BABF801C33F8A00082BADE /* Verdnaturaventas.app */; + productType = "com.apple.product-type.application"; + }; + A6BABF931C33F8A00082BADE /* VerdnaturaventasTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = A6BABFAB1C33F8A00082BADE /* Build configuration list for PBXNativeTarget "VerdnaturaventasTests" */; + buildPhases = ( + A6BABF901C33F8A00082BADE /* Sources */, + A6BABF911C33F8A00082BADE /* Frameworks */, + A6BABF921C33F8A00082BADE /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + A6BABF961C33F8A00082BADE /* PBXTargetDependency */, + ); + name = VerdnaturaventasTests; + productName = VerdnaturaventasTests; + productReference = A6BABF941C33F8A00082BADE /* VerdnaturaventasTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + A6BABF9E1C33F8A00082BADE /* VerdnaturaventasUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = A6BABFAE1C33F8A00082BADE /* Build configuration list for PBXNativeTarget "VerdnaturaventasUITests" */; + buildPhases = ( + A6BABF9B1C33F8A00082BADE /* Sources */, + A6BABF9C1C33F8A00082BADE /* Frameworks */, + A6BABF9D1C33F8A00082BADE /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + A6BABFA11C33F8A00082BADE /* PBXTargetDependency */, + ); + name = VerdnaturaventasUITests; + productName = VerdnaturaventasUITests; + productReference = A6BABF9F1C33F8A00082BADE /* VerdnaturaventasUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A6BABF781C33F8A00082BADE /* Project object */ = { + isa = PBXProject; + attributes = { + KnownAssetTags = ( + New, + ); + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0820; + ORGANIZATIONNAME = "Nelo Sanchez Gomiz"; + TargetAttributes = { + A6BABF7F1C33F8A00082BADE = { + CreatedOnToolsVersion = 7.2; + DevelopmentTeam = S2MKP69DVN; + LastSwiftMigration = 0820; + }; + A6BABF931C33F8A00082BADE = { + CreatedOnToolsVersion = 7.2; + LastSwiftMigration = 0820; + TestTargetID = A6BABF7F1C33F8A00082BADE; + }; + A6BABF9E1C33F8A00082BADE = { + CreatedOnToolsVersion = 7.2; + LastSwiftMigration = 0820; + TestTargetID = A6BABF7F1C33F8A00082BADE; + }; + }; + }; + buildConfigurationList = A6BABF7B1C33F8A00082BADE /* Build configuration list for PBXProject "Verdnaturaventas" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + ca, + en, + es, + pt, + ); + mainGroup = A6BABF771C33F8A00082BADE; + productRefGroup = A6BABF811C33F8A00082BADE /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = A6BABFCF1C33F9000082BADE /* Products */; + ProjectRef = A6BABFCE1C33F9000082BADE /* BaseLibrary.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + A6BABF7F1C33F8A00082BADE /* Verdnaturaventas */, + A6BABF931C33F8A00082BADE /* VerdnaturaventasTests */, + A6BABF9E1C33F8A00082BADE /* VerdnaturaventasUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + A6BABFD41C33F9010082BADE /* BaseLibrary.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = BaseLibrary.framework; + remoteRef = A6BABFD31C33F9010082BADE /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + A6BABFD61C33F9010082BADE /* BaseLibraryTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = BaseLibraryTests.xctest; + remoteRef = A6BABFD51C33F9010082BADE /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + A6BABF7E1C33F8A00082BADE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A62C696B1E8A6ED5000BCDBC /* CeldaLineasRecibidas.xib in Resources */, + A649B9C41C96E68400024538 /* Localizable.strings in Resources */, + A6A95AEC1C4D1D6F00C8559C /* CeldaString.xib in Resources */, + A6AB5A1F1C4F6E17004F068F /* carrito.png in Resources */, + A676F1301C917D1000C0D751 /* mispagos25.png in Resources */, + A676F1121C91496900C0D751 /* inicio_fill50.png in Resources */, + A67B6DC81C902D3000F03F3F /* inicio25.png in Resources */, + A6AE405C1C7EF17500C6FE6C /* back66.png in Resources */, + A676F1481C91802C00C0D751 /* buscar25.png in Resources */, + A6AEC0241CABE59F00807AA3 /* noimagen-01.png in Resources */, + A676F14A1C91802C00C0D751 /* buscar75.png in Resources */, + A676F11F1C915CC500C0D751 /* ticB50.png in Resources */, + A676F1461C91802C00C0D751 /* buscar_fill50.png in Resources */, + A676F1111C91496900C0D751 /* inicio_fill25.png in Resources */, + A6F581541C6B4E8B0003D27F /* CeldaPrecios.xib in Resources */, + A676F1201C915CC500C0D751 /* ticB75.png in Resources */, + A63FB08E1C5B9A5B00C42AF4 /* CeldaBoton.xib in Resources */, + A676F1131C91496900C0D751 /* inicio_fill75.png in Resources */, + A6366C7E1C90507000EF8470 /* Raleway-ExtraLight.ttf in Resources */, + A67B6DC31C902AE700F03F3F /* carrito50.png in Resources */, + A6366C831C90507000EF8470 /* Raleway-SemiBold.ttf in Resources */, + A65F5E721C47BDF2004FEAE1 /* Main.storyboard in Resources */, + A6AE405B1C7EF17500C6FE6C /* back44.png in Resources */, + A649B9C61C96E68400024538 /* Localizable.strings in Resources */, + A67B6DC21C902AE700F03F3F /* carrito25.png in Resources */, + A676F1471C91802C00C0D751 /* buscar_fill75.png in Resources */, + A676F1381C917D1000C0D751 /* salir75.png in Resources */, + A6AB5A2C1C4F9461004F068F /* verde.png in Resources */, + A67B6DC91C902D3000F03F3F /* inicio50.png in Resources */, + A657546F1F31AD35002FFB77 /* ItemTag.xib in Resources */, + A6BABF8B1C33F8A00082BADE /* Assets.xcassets in Resources */, + A676F1331C917D1000C0D751 /* oculto25.png in Resources */, + A676F13E1C917F1400C0D751 /* micuenta_fill75.png in Resources */, + A676F1571C9187DE00C0D751 /* 120.png in Resources */, + A6366C821C90507000EF8470 /* Raleway-Regular.ttf in Resources */, + A64EC3B01E8D344200B7166A /* CeldaTicketRecibido.xib in Resources */, + A67B6DC41C902AE700F03F3F /* carrito75.png in Resources */, + A603401F1C3FE07100BDF2ED /* Login-01.jpg in Resources */, + A6366C7D1C90507000EF8470 /* Raleway-ExtraBold.ttf in Resources */, + A65F5E711C47BDF2004FEAE1 /* LaunchScreen.storyboard in Resources */, + A67B6DBC1C90290700F03F3F /* micuenta50.png in Resources */, + A676F13C1C917F1400C0D751 /* micuenta_fill25.png in Resources */, + A6366C801C90507000EF8470 /* Raleway-Light.ttf in Resources */, + A6F5814E1C6B11480003D27F /* cancel1.png in Resources */, + A676F1321C917D1000C0D751 /* mispagos75.png in Resources */, + A676F1181C914B8B00C0D751 /* carrito_fill25.png in Resources */, + A6366C841C90507000EF8470 /* Raleway-Thin.ttf in Resources */, + A6AB5A291C4F9461004F068F /* confeccion.png in Resources */, + A676F1491C91802C00C0D751 /* buscar50.png in Resources */, + A676F1371C917D1000C0D751 /* salir50.png in Resources */, + A676F11E1C915CC500C0D751 /* ticB25.png in Resources */, + A676F1351C917D1000C0D751 /* oculto75.png in Resources */, + A649B9C51C96E68400024538 /* Localizable.strings in Resources */, + A6366C811C90507000EF8470 /* Raleway-Medium.ttf in Resources */, + A676F1581C9187DE00C0D751 /* 180.png in Resources */, + A676F1341C917D1000C0D751 /* oculto50.png in Resources */, + A676F1311C917D1000C0D751 /* mispagos50.png in Resources */, + A676F13D1C917F1400C0D751 /* micuenta_fill50.png in Resources */, + A6AB5A2B1C4F9461004F068F /* planta.png in Resources */, + A6AE405A1C7EF17500C6FE6C /* back22.png in Resources */, + A67B6DBB1C90290700F03F3F /* micuenta25.png in Resources */, + A6366C7C1C90507000EF8470 /* Raleway-Bold.ttf in Resources */, + A676F12D1C917D1000C0D751 /* envios25.png in Resources */, + A6AB5A271C4F9461004F068F /* artificial.png in Resources */, + A676F1191C914B8B00C0D751 /* carrito_fill50.png in Resources */, + A676F1361C917D1000C0D751 /* salir25.png in Resources */, + A6B028531C574BDF00D679EF /* CeldaImageTitle.xib in Resources */, + A60340201C3FE07100BDF2ED /* Login.png in Resources */, + A6AB5A2A1C4F9461004F068F /* flor.png in Resources */, + A6366C7B1C90507000EF8470 /* OFL.txt in Resources */, + A6B0285E1C578F4700D679EF /* CeldaDobleString.xib in Resources */, + A63D76B11C563D93009C2A16 /* disclouser.png in Resources */, + A63FB0931C5B9D0300C42AF4 /* CeldaArticulo.xib in Resources */, + A67B6DBD1C90290700F03F3F /* micuenta75.png in Resources */, + A649B9C31C96E68400024538 /* Localizable.strings in Resources */, + A69984241C686F3F002E8CCC /* CeldaCarrito.xib in Resources */, + A64211401F2F562700DFBE10 /* CeldaArticuloTags.xib in Resources */, + A6E3A4C51C7495F7009CE806 /* CeldaPrecioRecalculado.xib in Resources */, + A676F1451C91802C00C0D751 /* buscar_fill25.png in Resources */, + A6366C7F1C90507000EF8470 /* Raleway-Heavy.ttf in Resources */, + A676F12E1C917D1000C0D751 /* envios50.png in Resources */, + A67B6DCA1C902D3000F03F3F /* inicio75.png in Resources */, + A676F11A1C914B8B00C0D751 /* carrito_fill75.png in Resources */, + A6AB5A281C4F9461004F068F /* complemento.png in Resources */, + A6F581511C6B11480003D27F /* Trash.png in Resources */, + A676F12F1C917D1000C0D751 /* envios75.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A6BABF921C33F8A00082BADE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A6BABF9D1C33F8A00082BADE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 54259F0919E1254B694028C9 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + A9A92DCF155DDF5F6A7878A2 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + AF02D8DB6E6B1D118A959FA5 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A6BABF7C1C33F8A00082BADE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A63FB0871C5B77EA00C42AF4 /* TransitionManager.swift in Sources */, + A69935E11C510C1700A94281 /* OrderResumen.swift in Sources */, + A6B6E0E81C58DC550047EB04 /* Colors.swift in Sources */, + A6BABFE31C33FCBC0082BADE /* FacadeVentasClient.swift in Sources */, + A679D2931C8ED3EC0035CD77 /* DialogPrecios.swift in Sources */, + A68095F21C7C513200F3283C /* CmdTransactionEnd.swift in Sources */, + A69935DB1C51036200A94281 /* CeldaConsignatario.swift in Sources */, + A679D2911C8ED3EC0035CD77 /* DialogCalendar.swift in Sources */, + A65754721F31BEBA002FFB77 /* ItemTag.swift in Sources */, + A63FB08A1C5B7EBB00C42AF4 /* ViewDetalleArticulo.swift in Sources */, + A6B6E0F01C58E9820047EB04 /* ParserTipo.swift in Sources */, + A6AE40551C7EE9EC00C6FE6C /* AlertItemCarrito.swift in Sources */, + A68E7F691C75DA5D009ED57C /* ParserArrayClientes.swift in Sources */, + A69B43011C6C6FD2009F69B4 /* ParserOrder.swift in Sources */, + A69B43041C6C7E8C009F69B4 /* ParserOrderRow.swift in Sources */, + A699842A1C68ADAE002E8CCC /* ControllerArticulo.swift in Sources */, + A69CEDCA1C3A7B9000482F9B /* ParserConsignatario.swift in Sources */, + A66BFFDB1E8B9D2900776ED7 /* ViewImage.swift in Sources */, + A67499CC1C7AFBB5007E2B5A /* AlertCambioPedido.swift in Sources */, + A6957DF51C844D23000A2219 /* ViewPanel.swift in Sources */, + A67278381C92F60B0059E441 /* AlertCambios.swift in Sources */, + A6B73A211C43EAD50084C3CE /* ControllerPreferences.swift in Sources */, + A6A8EF451C59FB6900A5D889 /* ParserTarifa.swift in Sources */, + A65F5E641C47ADDE004FEAE1 /* ArticuloVentas.swift in Sources */, + A6A95ADB1C4CF0F500C8559C /* Vista.swift in Sources */, + A65F5E5D1C47A7C4004FEAE1 /* Order.swift in Sources */, + A66FEA0E1C84961B00189AE4 /* ViewChangeMail.swift in Sources */, + A66EDF281C897661008EF663 /* ParserArrayTicketRecepcion.swift in Sources */, + A66EDF1E1C89709B008EF663 /* TicketRecepcion.swift in Sources */, + A679D2901C8ED3EC0035CD77 /* DialogAgencias.swift in Sources */, + A66FEA121C84AF9400189AE4 /* ViewChangePassword.swift in Sources */, + A68095E91C7C3D3E00F3283C /* ViewNavegador.swift in Sources */, + A69CEDBB1C3A65D900482F9B /* ParserClienteVentas.swift in Sources */, + A6E3A4C71C749782009CE806 /* CeldaPrecioRecalculado.swift in Sources */, + A6B028601C57902400D679EF /* ViewOrderResume.swift in Sources */, + A699684A1C8D8DD100C73440 /* ViewLineasPedido.swift in Sources */, + A69935E71C510CEF00A94281 /* ParserOrderResumen.swift in Sources */, + A6AEC0271CABE75A00807AA3 /* UIImageViewAsyncVentas.swift in Sources */, + A67499C71C7AEA2B007E2B5A /* AlertRows.swift in Sources */, + A69935E91C510F2200A94281 /* CmdObtenerPedidosPendientes.swift in Sources */, + A6957DF81C8457DB000A2219 /* ViewAccount.swift in Sources */, + A66EDF201C8970B6008EF663 /* TicketRecepcionLinea.swift in Sources */, + A6F581581C6B6AF50003D27F /* DatosCompra.swift in Sources */, + A68095F41C7C67B800F3283C /* DialogValidarPedido.swift in Sources */, + A69CEDCC1C3A82D700482F9B /* SecurityFacade.swift in Sources */, + A69935EB1C51130400A94281 /* ViewListadoPedidosPendientes.swift in Sources */, + A68095FB1C7C768E00F3283C /* CmdSplitOrder.swift in Sources */, + A6B6E0EE1C58E85C0047EB04 /* Tipo.swift in Sources */, + A6F581561C6B50AE0003D27F /* CeldaPrecios.swift in Sources */, + A6A8EF431C59FAA000A5D889 /* ParserArrayArticulos.swift in Sources */, + A69CEDBD1C3A660800482F9B /* ClienteVentas.swift in Sources */, + A66EDF2A1C8977BF008EF663 /* ViewShippings.swift in Sources */, + A64EC3B21E8D36AE00B7166A /* CeldaTicketRecibido.swift in Sources */, + A6B6E0EA1C58DD6E0047EB04 /* ViewFamilias.swift in Sources */, + A678A9F61C8820C4001BD3BF /* AlertEmailModificado.swift in Sources */, + A62C696D1E8A70E4000BCDBC /* CeldaLineasRecibidas.swift in Sources */, + A6E3A4C01C746B09009CE806 /* CmdVerificarAgencia.swift in Sources */, + A67A13F21C735D33008A4B5C /* CmdRecuperarPedido.swift in Sources */, + A6B6E0EC1C58E73F0047EB04 /* CmdObtenerTipos.swift in Sources */, + A66EDF1C1C896FE1008EF663 /* CmdObtenerPedidos.swift in Sources */, + A68095F01C7C409900F3283C /* ParserDatosBanco.swift in Sources */, + A65F5E661C47AF6A004FEAE1 /* Tarifa.swift in Sources */, + A6B73A231C43F2100084C3CE /* ViewMain.swift in Sources */, + A69984281C6876CC002E8CCC /* ViewCarrito.swift in Sources */, + A68095EE1C7C3EA300F3283C /* DatosPasarBanco.swift in Sources */, + A62C69681E8A44B4000BCDBC /* MyFileManager.swift in Sources */, + A69935E51C510C3D00A94281 /* ControllerPedido.swift in Sources */, + A6B6DED41C69F08F004FEE3B /* CircleLabel.swift in Sources */, + A65F5E621C47AD72004FEAE1 /* OrderRow.swift in Sources */, + A69CEE571C3A95E300482F9B /* ViewLogin.swift in Sources */, + A6B6E0F21C58EB8A0047EB04 /* ParametrosReino.swift in Sources */, + A6876E8F1C771045009C3C56 /* AlertAgency.swift in Sources */, + A68E7F651C75D536009ED57C /* ViewSearch.swift in Sources */, + A68095EC1C7C3E0A00F3283C /* CmdObtenerDatosPasarBanco.swift in Sources */, + A630B94F1F30B1960029BF52 /* CeldaArticuloTags.swift in Sources */, + A6A95AD81C4CE94E00C8559C /* CmdBuscarArticulos.swift in Sources */, + A699684D1C8D9C7900C73440 /* DialogPagarDeuda.swift in Sources */, + A6A95ADF1C4CF44D00C8559C /* CmdObtenerAgencias.swift in Sources */, + A65F5E681C47AF8F004FEAE1 /* Component.swift in Sources */, + A6AE405E1C7F13D800C6FE6C /* AlertNoArticulos.swift in Sources */, + A69CEDC01C3A677200482F9B /* Consignatario.swift in Sources */, + A65F5E6B1C47B9C6004FEAE1 /* UtilDate.swift in Sources */, + A6BABFE81C3414CE0082BADE /* Commands.swift in Sources */, + A679D2921C8ED3EC0035CD77 /* DialogConsignatarios.swift in Sources */, + A63FB0961C5B9D0F00C42AF4 /* ParserArticulo.swift in Sources */, + A66EDF221C897284008EF663 /* ParserTicketRecepcion.swift in Sources */, + A64EC3AB1E8CE58B00B7166A /* ParserTicketRecepcionLinea.swift in Sources */, + A6AEFF191C4504220077EB54 /* TabView.swift in Sources */, + A6E3A4C91C74998E009CE806 /* OrderDiference.swift in Sources */, + A6BBAC941C4E3C0600C10738 /* ParserAgencias.swift in Sources */, + A6A8EF471C5A021800A5D889 /* CmdObtenerStock.swift in Sources */, + A64EC3AE1E8D082C00B7166A /* CmdCheckMovimientos.swift in Sources */, + A66FEA101C849FC900189AE4 /* CmdModificarCliente.swift in Sources */, + A6B081AE1C85879B000EEF85 /* CmdModificarPassword.swift in Sources */, + A6AE40621C7F2A1800C6FE6C /* DialogFinalizarPedido.swift in Sources */, + A6BABFEA1C3416310082BADE /* CommandBaseVentas.swift in Sources */, + A6876E911C771218009C3C56 /* AlertBase.swift in Sources */, + A69984261C6871B1002E8CCC /* CeldaCarrito.swift in Sources */, + A6BABFDA1C33F9360082BADE /* FacadeVentas.swift in Sources */, + A65F5E601C47AA6D004FEAE1 /* Agencia.swift in Sources */, + A67499CA1C7AF893007E2B5A /* AlertPreciosRecalculados.swift in Sources */, + A6B028561C574C8900D679EF /* CeldaImageTitle.swift in Sources */, + A63FB0941C5B9D0300C42AF4 /* CeldaBoton.swift in Sources */, + A6A95ADD1C4CF1BF00C8559C /* ParserVistas.swift in Sources */, + A6A8EF3C1C59EB8600A5D889 /* Values.swift in Sources */, + A68E7F671C75D99B009ED57C /* CmdBuscarClientes.swift in Sources */, + A678A9F41C8819EB001BD3BF /* AlertPasswordCambiado.swift in Sources */, + A6A8EF3F1C59F0B300A5D889 /* ViewArticulos.swift in Sources */, + A6E3A4CB1C749A85009CE806 /* CmdRecalcularPrecios.swift in Sources */, + A6BABFE61C3412410082BADE /* CmdLogin.swift in Sources */, + A6A95AE91C4D1C0300C8559C /* CeldaString.swift in Sources */, + A60259091C5901EB00A7695F /* CeldaArticulo.swift in Sources */, + A6B0285C1C578F1D00D679EF /* CeldaDobleString.swift in Sources */, + A67A13EE1C73578D008A4B5C /* ViewResumenPedido.swift in Sources */, + A68095F81C7C721400F3283C /* CmdObtenerCreditoRiesgo.swift in Sources */, + A6E3A4CD1C74ACAC009CE806 /* ViewPreciosRecalculados.swift in Sources */, + A6BABF841C33F8A00082BADE /* AppDelegate.swift in Sources */, + A6F5815A1C6B76BA0003D27F /* CmdCrearOrder.swift in Sources */, + A6AE40601C7F1AAD00C6FE6C /* AlertVaciarCarrito.swift in Sources */, + A69935E31C510C3000A94281 /* CardImage.swift in Sources */, + A679D2971C8EDEF30035CD77 /* AlertRate.swift in Sources */, + A679D2951C8EDCCC0035CD77 /* AlertStock.swift in Sources */, + A63FB08C1C5B817700C42AF4 /* CmdObtenerArticuloVenta.swift in Sources */, + A68E7F6B1C760160009ED57C /* CmdObtenerClienteById.swift in Sources */, + A6AB5A331C4FBD4F004F068F /* CardView.swift in Sources */, + A678A9F11C88115D001BD3BF /* AlertErrorPassword.swift in Sources */, + A69CEE551C3A95B800482F9B /* MyView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A6BABF901C33F8A00082BADE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A6BABF991C33F8A00082BADE /* VerdnaturaventasTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A6BABF9B1C33F8A00082BADE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A6BABFA41C33F8A00082BADE /* VerdnaturaventasUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + A6BABF961C33F8A00082BADE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A6BABF7F1C33F8A00082BADE /* Verdnaturaventas */; + targetProxy = A6BABF951C33F8A00082BADE /* PBXContainerItemProxy */; + }; + A6BABFA11C33F8A00082BADE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A6BABF7F1C33F8A00082BADE /* Verdnaturaventas */; + targetProxy = A6BABFA01C33F8A00082BADE /* PBXContainerItemProxy */; + }; + A6BABFDC1C33F98D0082BADE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BaseLibrary; + targetProxy = A6BABFDB1C33F98D0082BADE /* PBXContainerItemProxy */; + }; + A6BABFE01C33F9AA0082BADE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BaseLibrary; + targetProxy = A6BABFDF1C33F9AA0082BADE /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + A649B9B81C96E68400024538 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + A649B9B91C96E68400024538 /* ca */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + A649B9BB1C96E68400024538 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + A649B9BC1C96E68400024538 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + A649B9BE1C96E68400024538 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + A649B9BF1C96E68400024538 /* es */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + A649B9C11C96E68400024538 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + A649B9C21C96E68400024538 /* pt */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + A6BABFA61C33F8A00082BADE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + New_Setting = ""; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + A6BABFA71C33F8A00082BADE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + New_Setting = ""; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A6BABFA91C33F8A00082BADE /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7E3B7176697597B33B41997D /* Pods.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = S2MKP69DVN; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/build/Debug-iphoneos", + ); + INFOPLIST_FILE = Verdnaturaventas/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.verdnatura.Verdnaturaventas; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + A6BABFAA1C33F8A00082BADE /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 99526864B48B202434FA66B1 /* Pods.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = S2MKP69DVN; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/build/Debug-iphoneos", + ); + INFOPLIST_FILE = Verdnaturaventas/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.verdnatura.Verdnaturaventas; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + A6BABFAC1C33F8A00082BADE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = VerdnaturaventasTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Verdnatura.VerdnaturaventasTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Verdnaturaventas.app/Verdnaturaventas"; + }; + name = Debug; + }; + A6BABFAD1C33F8A00082BADE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = VerdnaturaventasTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Verdnatura.VerdnaturaventasTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Verdnaturaventas.app/Verdnaturaventas"; + }; + name = Release; + }; + A6BABFAF1C33F8A00082BADE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = VerdnaturaventasUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Verdnatura.VerdnaturaventasUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_TARGET_NAME = Verdnaturaventas; + USES_XCTRUNNER = YES; + }; + name = Debug; + }; + A6BABFB01C33F8A00082BADE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = VerdnaturaventasUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Verdnatura.VerdnaturaventasUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_TARGET_NAME = Verdnaturaventas; + USES_XCTRUNNER = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A6BABF7B1C33F8A00082BADE /* Build configuration list for PBXProject "Verdnaturaventas" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A6BABFA61C33F8A00082BADE /* Debug */, + A6BABFA71C33F8A00082BADE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A6BABFA81C33F8A00082BADE /* Build configuration list for PBXNativeTarget "Verdnaturaventas" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A6BABFA91C33F8A00082BADE /* Debug */, + A6BABFAA1C33F8A00082BADE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A6BABFAB1C33F8A00082BADE /* Build configuration list for PBXNativeTarget "VerdnaturaventasTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A6BABFAC1C33F8A00082BADE /* Debug */, + A6BABFAD1C33F8A00082BADE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A6BABFAE1C33F8A00082BADE /* Build configuration list for PBXNativeTarget "VerdnaturaventasUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A6BABFAF1C33F8A00082BADE /* Debug */, + A6BABFB01C33F8A00082BADE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A6BABF781C33F8A00082BADE /* Project object */; +} diff --git a/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..b4e8e8e --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/UserInterfaceState.xcuserstate b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..05dbe6a Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/WorkspaceSettings.xcsettings b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..dd7403b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,16 @@ + + + + + BuildLocationStyle + UseAppPreferences + CustomBuildLocationType + RelativeToDerivedData + DerivedDataLocationStyle + Default + IssueFilterStyle + ShowActiveSchemeOnly + LiveSourceIssuesEnabled + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/xcdebugger/Expressions.xcexplist b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/xcdebugger/Expressions.xcexplist new file mode 100644 index 0000000..7e365a8 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcodeproj/project.xcworkspace/xcuserdata/nelo.xcuserdatad/xcdebugger/Expressions.xcexplist @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcschemes/xcschememanagement.plist b/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..14356c0 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Verdnaturaventas.xcscheme + + orderHint + 0 + + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/nelo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/nelo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/nelo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/Verdnaturaventas.xcscheme b/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/Verdnaturaventas.xcscheme new file mode 100644 index 0000000..248bda5 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/Verdnaturaventas.xcscheme @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/xcschememanagement.plist b/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..e2fec97 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcodeproj/xcuserdata/nelo.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,32 @@ + + + + + SchemeUserState + + Verdnaturaventas.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + A6BABF7F1C33F8A00082BADE + + primary + + + A6BABF931C33F8A00082BADE + + primary + + + A6BABF9E1C33F8A00082BADE + + primary + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcworkspace/contents.xcworkspacedata b/Verdnaturaventas/Verdnaturaventas.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..91998c0 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/UserInterfaceState.xcuserstate b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..f1e9ef6 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..ed9a9b4 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/nelo.xcuserdatad/UserInterfaceState.xcuserstate b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/nelo.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..a51b13f Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/nelo.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/nelo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/nelo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..41ae946 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/nelo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,23 @@ + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertAgency.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertAgency.swift new file mode 100644 index 0000000..72e47e1 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertAgency.swift @@ -0,0 +1,25 @@ +// +// AlertAgency.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 19/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertAgency: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("toolbar_colores_agencia", comment: "") + } + + override func generateButtons() { + + createButtonAccept() + + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertBase.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertBase.swift new file mode 100644 index 0000000..42a965b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertBase.swift @@ -0,0 +1,59 @@ +// +// AlertBase.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 19/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertBase: NSObject { + + var viewController: UIViewController? + var actions = Array() + var title = "" + var message = "" + + init(v: UIViewController) + { + viewController = v + } + + func showDialog() + { + + generateButtons() + + let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert) + + for a in actions{ + alert.addAction(a) + } + + viewController!.present(alert, animated: true, completion: nil) + + } + + func generateButtons() {} + + func createButton(_ title: String, handler: ((UIAlertAction) -> Void)?!) + { + actions.append(UIAlertAction(title: title, style: .default, handler: handler)) + } + + + func createButtonAccept(){ + createButton(NSLocalizedString("aceptar", comment: ""), handler: accept) + } + + func createButtonCancel(){ + createButton(NSLocalizedString("cancelar", comment: ""), handler: cancel) + } + + + func accept(_ alert: UIAlertAction!){} + + func cancel(_ alert: UIAlertAction!){} + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertCambioPedido.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertCambioPedido.swift new file mode 100644 index 0000000..53f56f5 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertCambioPedido.swift @@ -0,0 +1,22 @@ +// +// AlertCambioPedido.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 22/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertCambioPedido: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("mensaje_aviso_cambios_pedido", comment: "") + } + + override func generateButtons() { + createButtonAccept() + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertCambios.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertCambios.swift new file mode 100644 index 0000000..5e7ed6b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertCambios.swift @@ -0,0 +1,44 @@ +// +// AlertCambios.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 11/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertCambios: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("no_cambios_confirmados", comment: "") + } + + override func generateButtons() { + + createButtonCancel() + createButtonAccept() + + } + + override func accept(_ alert: UIAlertAction!) { + + let aplication = (viewController as! MyViewVentas).aplication + + if(aplication.pedido!.agenciaAntigua != nil) + { + aplication.pedido!.agencia = aplication.pedido!.agenciaAntigua! + aplication.pedido!.agenciaAntigua = nil + } + if(aplication.pedido!.FechaAntigua != nil) + { + aplication.pedido!.Fecha = aplication.pedido!.FechaAntigua! + aplication.pedido!.FechaAntigua = nil + } + + self.viewController?.navigationController?.popViewController(animated: true) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertEmailModificado.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertEmailModificado.swift new file mode 100644 index 0000000..4bcdf48 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertEmailModificado.swift @@ -0,0 +1,27 @@ +// +// AlertEmailModificado.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 3/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertEmailModificado: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("email_modificado", comment: "") + } + + override func generateButtons() { + createButtonAccept() + } + + override func accept(_ alert: UIAlertAction!) { + _ = viewController?.navigationController?.popViewController(animated: true) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertErrorPassword.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertErrorPassword.swift new file mode 100644 index 0000000..723c24b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertErrorPassword.swift @@ -0,0 +1,23 @@ +// +// AlertErrorPassword.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 3/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertErrorPassword: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("error", comment: "") + + } + + override func generateButtons() { + createButtonAccept() + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertItemCarrito.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertItemCarrito.swift new file mode 100644 index 0000000..b0bdf61 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertItemCarrito.swift @@ -0,0 +1,61 @@ +// +// AlertItemCarrito.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 25/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertItemCarrito: AlertBase { + + var row: OrderRow? + + init(v: UIViewController, row: OrderRow) + { + super.init(v: v) + self.row = row + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("modificar_carrito", comment: "") + } + + override func generateButtons() { + if (row!.tarifa!.rate! != 3) + { + createButton(String(format: NSLocalizedString("navigation_carrito_anyadir", comment: ""), row!.tarifa!.grouping!.intValue), handler: add) + } + + if (row!.amount!.intValue - row!.tarifa!.grouping!.intValue > 0) { + createButton(String(format: NSLocalizedString("navigation_carrito_eliminar", comment: ""), row!.tarifa!.grouping!.intValue), handler: substract) + } + + createButton(NSLocalizedString("navigation_carrito_borrar", comment: ""), handler: remove) + createButtonCancel() + } + + func add(_ alert: UIAlertAction!) + { + row!.amount = NSNumber(value: row!.amount!.intValue + row!.tarifa!.grouping!.intValue as Int) + replaceRow() + } + + func substract(_ alert: UIAlertAction!) + { + row!.amount = NSNumber(value: row!.amount!.intValue - row!.tarifa!.grouping!.intValue as Int) + replaceRow() + } + + func remove(_ alert: UIAlertAction!) + { + row!.amount = NSNumber(value: row!.amount!.intValue - row!.amount!.intValue as Int) + replaceRow() + } + + func replaceRow() + { + ControllerPedido.updateRow(row!) + (viewController as! ViewCarrito).updateRow() + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertNoArticulos.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertNoArticulos.swift new file mode 100644 index 0000000..f85d3f8 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertNoArticulos.swift @@ -0,0 +1,24 @@ +// +// AlertNoArticulos.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 25/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertNoArticulos: AlertBase{ + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("activity_validar_pedido_no_articulos", comment: "") + + } + + override func generateButtons() { + createButtonAccept() + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertPasswordCambiado.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertPasswordCambiado.swift new file mode 100644 index 0000000..3076fff --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertPasswordCambiado.swift @@ -0,0 +1,27 @@ +// +// AlertPasswordCambiado.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 3/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertPasswordCambiado: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("password_modificado", comment: "") + } + + override func generateButtons() { + createButtonAccept() + } + + override func accept(_ alert: UIAlertAction!) { + viewController?.dismiss(animated: true, completion: nil) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertPreciosRecalculados.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertPreciosRecalculados.swift new file mode 100644 index 0000000..de923f2 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertPreciosRecalculados.swift @@ -0,0 +1,24 @@ +// +// AlertPreciosRecalculados.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 22/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertPreciosRecalculados: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("mensaje_aviso_cambios_lineas", comment: "") + } + + override func generateButtons() { + createButtonAccept() + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertRate.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertRate.swift new file mode 100644 index 0000000..9dbac55 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertRate.swift @@ -0,0 +1,23 @@ +// +// AlertRate.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 8/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertRate: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("alert_rate", comment: "") + } + + override func generateButtons() { + createButtonAccept() + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertRows.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertRows.swift new file mode 100644 index 0000000..da9df6d --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertRows.swift @@ -0,0 +1,28 @@ +// +// AlertRows.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 22/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertRows: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("main_mensaje_aviso", comment: "") + } + + override func generateButtons() { + createButtonCancel() + createButtonAccept() + } + + override func accept(_ alert: UIAlertAction!) { + (viewController as! MyViewVentas).launchSegue("segueOrder") + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertStock.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertStock.swift new file mode 100644 index 0000000..cd32b46 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertStock.swift @@ -0,0 +1,23 @@ +// +// AlertStock.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 8/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertStock: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("dialog_comprar_available", comment: "") + } + + override func generateButtons() { + createButtonAccept() + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Alerts/AlertVaciarCarrito.swift b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertVaciarCarrito.swift new file mode 100644 index 0000000..4e352d0 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Alerts/AlertVaciarCarrito.swift @@ -0,0 +1,31 @@ +// +// AlertVaciarCarrito.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 25/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class AlertVaciarCarrito: AlertBase { + + override init(v: UIViewController) { + super.init(v: v) + title = NSLocalizedString("aviso", comment: "") + message = NSLocalizedString("vaciar_carrito", comment: "") + } + + override func generateButtons() { + createButtonCancel() + createButtonAccept() + } + + override func accept(_ alert: UIAlertAction!) { + ControllerPedido.vaciarCarrito() + let vc = self.viewController as! ViewCarrito + vc.updateRow() + + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/AppDelegate.swift b/Verdnaturaventas/Verdnaturaventas/AppDelegate.swift new file mode 100644 index 0000000..a6c91d3 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/AppDelegate.swift @@ -0,0 +1,67 @@ +// +// AppDelegate.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + var cliente: ClienteVentas? = nil + var pedido: Order? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch + createOrder() + removeData() + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + func createOrder() + { + pedido = Order() + pedido?.Fecha = UtilDate.dateToString(UtilDate.addDays(Date(), days: 1)) + } + + func removeData() { + let list = MyFileManager.loadTicketLines() + var array: Array = [] + for l in list{ + let dateLine = UtilDate.stringToDate(l.FechaContar!) + if(UtilDate.addDays(dateLine, days: 5) > Date()){ + array.append(l) + } + } + MyFileManager.saveTicketLines(lines: array) + } + +} + diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..b22f5b6 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,106 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-Small@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-Small@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-60@3x.png", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-83.5@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-40.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-40.png new file mode 100644 index 0000000..d462033 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-40.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png new file mode 100644 index 0000000..02dfa8b Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png new file mode 100644 index 0000000..2c83b08 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 0000000..2c83b08 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png new file mode 100644 index 0000000..aa89d75 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 0000000..52886d6 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png new file mode 100644 index 0000000..bad3934 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png new file mode 100644 index 0000000..e297a97 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-Small.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-Small.png new file mode 100644 index 0000000..5347de6 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-Small.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png new file mode 100644 index 0000000..4125b25 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png new file mode 100644 index 0000000..4837b1e Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/Contents.json new file mode 100644 index 0000000..c60db51 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "back22.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "back44.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "back66.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/back22.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/back22.png new file mode 100644 index 0000000..09a4371 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/back22.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/back44.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/back44.png new file mode 100644 index 0000000..d07f800 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/back44.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/back66.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/back66.png new file mode 100644 index 0000000..5696a5d Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/BackButton.imageset/back66.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/Contents.json new file mode 100644 index 0000000..b551d77 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "buscar25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "buscar50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "buscar75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/buscar25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/buscar25.png new file mode 100644 index 0000000..a2cf0a6 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/buscar25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/buscar50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/buscar50.png new file mode 100644 index 0000000..736358c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/buscar50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/buscar75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/buscar75.png new file mode 100644 index 0000000..5f3b020 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar.imageset/buscar75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/Contents.json new file mode 100644 index 0000000..56828dd --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "buscar_fill25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "buscar_fill50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "buscar_fill75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/buscar_fill25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/buscar_fill25.png new file mode 100644 index 0000000..c2607f5 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/buscar_fill25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/buscar_fill50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/buscar_fill50.png new file mode 100644 index 0000000..3c649c7 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/buscar_fill50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/buscar_fill75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/buscar_fill75.png new file mode 100644 index 0000000..26a6da7 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Buscar_fill.imageset/buscar_fill75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/Contents.json new file mode 100644 index 0000000..b0fe41b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "carrito25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "carrito50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "carrito75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/carrito25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/carrito25.png new file mode 100644 index 0000000..5fd25e2 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/carrito25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/carrito50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/carrito50.png new file mode 100644 index 0000000..78b6bf8 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/carrito50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/carrito75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/carrito75.png new file mode 100644 index 0000000..6fe4030 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito.imageset/carrito75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/Contents.json new file mode 100644 index 0000000..963f0c1 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "carrito_fill25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "carrito_fill50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "carrito_fill75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/carrito_fill25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/carrito_fill25.png new file mode 100644 index 0000000..a44bb7a Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/carrito_fill25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/carrito_fill50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/carrito_fill50.png new file mode 100644 index 0000000..030f07c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/carrito_fill50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/carrito_fill75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/carrito_fill75.png new file mode 100644 index 0000000..5fa4dc6 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Carrito_fill.imageset/carrito_fill75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/Contents.json new file mode 100644 index 0000000..18299c7 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "micuenta25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "micuenta50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "micuenta75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/micuenta25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/micuenta25.png new file mode 100644 index 0000000..f5b2795 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/micuenta25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/micuenta50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/micuenta50.png new file mode 100644 index 0000000..1f7ffde Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/micuenta50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/micuenta75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/micuenta75.png new file mode 100644 index 0000000..3ac66bc Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta.imageset/micuenta75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/Contents.json new file mode 100644 index 0000000..b6bd3f8 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "micuenta_fill25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "micuenta_fill50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "micuenta_fill75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/micuenta_fill25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/micuenta_fill25.png new file mode 100644 index 0000000..36dba02 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/micuenta_fill25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/micuenta_fill50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/micuenta_fill50.png new file mode 100644 index 0000000..7690338 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/micuenta_fill50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/micuenta_fill75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/micuenta_fill75.png new file mode 100644 index 0000000..1f9aeb7 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Cuenta_fill.imageset/micuenta_fill75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/Contents.json new file mode 100644 index 0000000..2e153d8 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "envios25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "envios50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "envios75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/envios25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/envios25.png new file mode 100644 index 0000000..76639d1 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/envios25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/envios50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/envios50.png new file mode 100644 index 0000000..0590790 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/envios50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/envios75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/envios75.png new file mode 100644 index 0000000..e42b0b7 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Envios.imageset/envios75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/Contents.json new file mode 100644 index 0000000..105dd10 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "inicio25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "inicio50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "inicio75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/inicio25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/inicio25.png new file mode 100644 index 0000000..5c3e739 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/inicio25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/inicio50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/inicio50.png new file mode 100644 index 0000000..119956c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/inicio50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/inicio75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/inicio75.png new file mode 100644 index 0000000..7ca578e Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home.imageset/inicio75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/Contents.json new file mode 100644 index 0000000..1054c18 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "inicio_fill25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "inicio_fill50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "inicio_fill75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/inicio_fill25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/inicio_fill25.png new file mode 100644 index 0000000..3872e5d Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/inicio_fill25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/inicio_fill50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/inicio_fill50.png new file mode 100644 index 0000000..e354a66 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/inicio_fill50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/inicio_fill75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/inicio_fill75.png new file mode 100644 index 0000000..48bf19c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Home_fill.imageset/inicio_fill75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/Contents.json new file mode 100644 index 0000000..802b392 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "oculto25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "oculto50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "oculto75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/oculto25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/oculto25.png new file mode 100644 index 0000000..a13a70d Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/oculto25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/oculto50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/oculto50.png new file mode 100644 index 0000000..c0b608f Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/oculto50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/oculto75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/oculto75.png new file mode 100644 index 0000000..284102f Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/OcultarPrecios.imageset/oculto75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/Contents.json new file mode 100644 index 0000000..0fd5822 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "mispagos25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "mispagos50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "mispagos75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/mispagos25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/mispagos25.png new file mode 100644 index 0000000..7003db8 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/mispagos25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/mispagos50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/mispagos50.png new file mode 100644 index 0000000..f50fa03 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/mispagos50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/mispagos75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/mispagos75.png new file mode 100644 index 0000000..7c00122 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Pagos.imageset/mispagos75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/Contents.json new file mode 100644 index 0000000..59334a7 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "salir25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "salir50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "salir75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/salir25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/salir25.png new file mode 100644 index 0000000..5ff9ab8 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/salir25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/salir50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/salir50.png new file mode 100644 index 0000000..6abc881 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/salir50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/salir75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/salir75.png new file mode 100644 index 0000000..9448841 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Salir.imageset/salir75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/Contents.json b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/Contents.json new file mode 100644 index 0000000..1f95bf2 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ticB25.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ticB50.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ticB75.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/ticB25.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/ticB25.png new file mode 100644 index 0000000..5babb0c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/ticB25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/ticB50.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/ticB50.png new file mode 100644 index 0000000..cefdafa Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/ticB50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/ticB75.png b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/ticB75.png new file mode 100644 index 0000000..cc6f157 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Assets.xcassets/Tick.imageset/ticB75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Base.lproj/LaunchScreen.storyboard b/Verdnaturaventas/Verdnaturaventas/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..2e721e1 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Base.lproj/Main.storyboard b/Verdnaturaventas/Verdnaturaventas/Base.lproj/Main.storyboard new file mode 100644 index 0000000..e136f0d --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Base.lproj/Main.storyboard @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticulo.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticulo.swift new file mode 100644 index 0000000..3ef892b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticulo.swift @@ -0,0 +1,42 @@ +// +// CeldaArticulo.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 27/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class CeldaArticulo: UICollectionViewCell { + + @IBOutlet weak var imagenArticulo: UIImageViewAsyncVentas! + @IBOutlet weak var lablArticulo: UILabel! + @IBOutlet weak var lablProductor: UILabel! + @IBOutlet weak var lablDesde: UILabel! + @IBOutlet weak var lablCaracteristicas: UILabel! + @IBOutlet weak var lablPrecio: UILabel! + + + + func pintarCelda(_ articulo: ArticuloVentasTags) + { + let url = String(format: "%@%@", Values.BASE_URL_SMALL, articulo.foto!) + imagenArticulo.downloadImage(url) + + lablArticulo.text = articulo.Article + if(ControllerPreferences.mostrarPrecios()) + { + lablDesde.text = NSLocalizedString("desde", comment: "") + lablPrecio.text = "\(UtilsNumbers.roundDouble(NSNumber(value: articulo.price!.doubleValue), decimals: 2))€" + } + else + { + lablDesde.text = " " + lablPrecio.text = " " + } + + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticulo.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticulo.xib new file mode 100644 index 0000000..a8de226 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticulo.xib @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + Raleway-Bold + + + Raleway-Medium + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticuloTags.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticuloTags.swift new file mode 100644 index 0000000..2bf342b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticuloTags.swift @@ -0,0 +1,42 @@ +// +// CeldaArticuloTags.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 1/8/17. +// Copyright © 2017 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class CeldaArticuloTags: UITableViewCell { + + @IBOutlet weak var imagenArticulo: UIImageViewAsyncVentas! + @IBOutlet weak var lablDesde: UILabel! + @IBOutlet weak var lablArticulo: UILabel! + @IBOutlet weak var lablPrecio: UILabel! + // @IBOutlet weak var viewTags: ViewTags! + + + func pintarCelda(_ articulo: ArticuloVentasTags) + { + let url = String(format: "%@%@", Values.BASE_URL_SMALL, articulo.foto!) + imagenArticulo.downloadImage(url) + + lablArticulo.text = articulo.Article + if(ControllerPreferences.mostrarPrecios()) + { + lablDesde.text = NSLocalizedString("desde", comment: "") + lablPrecio.text = "\(UtilsNumbers.roundDouble(NSNumber(value: articulo.price!.doubleValue), decimals: 2))€" + } + else + { + lablDesde.text = " " + lablPrecio.text = " " + } + + //viewTags.setTags(tags: articulo.tags) + + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticuloTags.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticuloTags.xib new file mode 100644 index 0000000..e6cd049 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaArticuloTags.xib @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + Raleway-Bold + + + Raleway-Medium + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaBoton.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaBoton.swift new file mode 100644 index 0000000..1874858 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaBoton.swift @@ -0,0 +1,21 @@ +// +// CeldaBoton.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CeldaBoton: UICollectionViewCell { + + @IBOutlet weak var boton: UIImageView! + + func pintarCelda(_ b: String) + { + let button = UIImage(named: b) + boton.image = button + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaBoton.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaBoton.xib new file mode 100644 index 0000000..21bb727 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaBoton.xib @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaCarrito.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaCarrito.swift new file mode 100644 index 0000000..01aac48 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaCarrito.swift @@ -0,0 +1,28 @@ +// +// CeldaCarrito.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 8/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class CeldaCarrito: UITableViewCell { + + @IBOutlet weak var imageArticle: UIImageViewAsync! + @IBOutlet weak var labelTitle: UILabel! + @IBOutlet weak var labelSubtitle: UILabel! + @IBOutlet weak var labelTotal: UILabel! + + func pintarCelda(_ foto: String, title: String, subtitle: String, total: String) + { + let url = String(format: "%@%@", Values.BASE_URL_SMALL, foto) + imageArticle.downloadImage(url) + labelTitle.text = title + labelSubtitle.text = subtitle + labelTotal.text = total + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaCarrito.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaCarrito.xib new file mode 100644 index 0000000..bb54a04 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaCarrito.xib @@ -0,0 +1,81 @@ + + + + + + + + + + + Raleway + Raleway + Raleway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaConsignatario.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaConsignatario.swift new file mode 100644 index 0000000..2561968 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaConsignatario.swift @@ -0,0 +1,22 @@ +// +// CeldaConsignatario.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 21/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CeldaConsignatario: UITableViewCell { + + @IBOutlet weak var labelConsignatario: UILabel! + @IBOutlet weak var lableDireccion: UILabel! + + func pintarCelda(_ consignatario: String, direccion: String) + { + labelConsignatario.text = consignatario + lableDireccion.text = direccion + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaDobleString.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaDobleString.swift new file mode 100644 index 0000000..05e23b0 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaDobleString.swift @@ -0,0 +1,26 @@ +// +// CeldaDobleString.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 26/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CeldaDobleString: UITableViewCell { + + @IBOutlet weak var title: UILabel! + @IBOutlet weak var content: UILabel! + + func pintarCelda(_ t: String, c: String, color: UIColor?) + { + title.text = t + content.text = c + if(color != nil) + { + self.backgroundColor = color + } + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaDobleString.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaDobleString.xib new file mode 100644 index 0000000..5298afe --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaDobleString.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + Raleway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaImageTitle.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaImageTitle.swift new file mode 100644 index 0000000..6eda0b4 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaImageTitle.swift @@ -0,0 +1,36 @@ +// +// CeldaImageTitle.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 26/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class CeldaImageTitle: UITableViewCell { + + + @IBOutlet weak var imageCell: UIImageViewAsync! + @IBOutlet weak var labelCell: UILabel! + + + + func paintCell(_ img: String, lbl: String) + { + imageCell.downloadImage(Values.BASE_URL_SMALL + img) + + labelCell.text = lbl + } + + func pintarCeldaLocal(_ img: String, lbl: String) + { + let image = UIImage(named: img) + + imageCell.image = image + + labelCell.text = lbl + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaImageTitle.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaImageTitle.xib new file mode 100644 index 0000000..a9ae0fb --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaImageTitle.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + Raleway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaLineasRecibidas.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaLineasRecibidas.swift new file mode 100644 index 0000000..26740fb --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaLineasRecibidas.swift @@ -0,0 +1,55 @@ +// +// CeldaCarrito.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 8/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class CeldaLineasRecibidas: UITableViewCell { + + weak var delegate: LaunchSegueFromImage? + var row: Int? = 0 + + @IBOutlet weak var imageLine: UIImageViewAsync! + @IBOutlet weak var labelLine: UILabel! + @IBOutlet weak var labelPrice: UILabel! + + func pintarCelda(foto: String, line: String, quantity: NSNumber, price: Double) + { + let url = String(format: "%@%@", Values.BASE_URL_SMALL, foto) + imageLine.downloadImage(url) + labelLine.text = line + let total = quantity.doubleValue * price + labelPrice.text = String(format:"%d", quantity.intValue) + "x" + String(format:"%.2f", price) + "=" + String(format: "%.2f", total) + generateTapImage() + } + + func changeCellBackground(ok: Bool){ + if(ok){ + self.backgroundColor = UtilsIos.getColor(Colors.verdnatura) + } + + self.backgroundColor = UtilsIos.getColor(Colors.white) + } + + func generateTapImage(){ + let singleTap = UITapGestureRecognizer(target: self, action: #selector(CeldaLineasRecibidas.tapDetected)) + singleTap.numberOfTapsRequired = 1 + imageLine.isUserInteractionEnabled = true + imageLine.addGestureRecognizer(singleTap) + } + + func tapDetected(){ + guard let row = row else { return } + delegate?.imageTapped(row: row) + } + +} + +protocol LaunchSegueFromImage: class { + func imageTapped(row: Int) +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaLineasRecibidas.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaLineasRecibidas.xib new file mode 100644 index 0000000..cb45b3d --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaLineasRecibidas.xib @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + Raleway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecioRecalculado.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecioRecalculado.swift new file mode 100644 index 0000000..75a3fae --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecioRecalculado.swift @@ -0,0 +1,83 @@ +// +// CeldaPrecioRecalculado.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 17/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class CeldaPrecioRecalculado: UITableViewCell { + + @IBOutlet weak var labelPrecio: UILabel! + @IBOutlet weak var labelDisponible: UILabel! + + func pintarCelda(_ diferencia: OrderDiference) + { + if(diferencia.escribirPrecio!) + { + + let oldString = String(format: NSLocalizedString("adapter_order_diference_precio_cambia", comment: ""), "\(UtilsNumbers.roundDouble(diferencia.oldPrice!, decimals: 2))") + + let atributedString = getString(oldString, color: UIColor.black) + + var color: UIColor? = nil + + if(diferencia.price!.doubleValue < diferencia.oldPrice!.doubleValue){ + color = UtilsIos.getColor(Colors.greens) + } + else{ + color = UtilsIos.getColor(Colors.flowers) + } + + atributedString.append(getString(" \(UtilsNumbers.roundDouble(diferencia.price!, decimals: 2))€", color: color!)) + + labelPrecio.attributedText = atributedString + + labelPrecio.isHidden = false + } + else + { + labelPrecio.isHidden = true + } + if(diferencia.escribirDisponible!) + { + + let oldCantidad = String(format: NSLocalizedString("adapter_order_diference_cantidad_cambia", comment: ""), "\(diferencia.oldCantidad!.intValue)") + + let atributedString = getString(oldCantidad, color: UIColor.black) + + var color: UIColor? = nil + + if(diferencia.cantidad!.intValue > diferencia.oldCantidad!.intValue){ + color = UtilsIos.getColor(Colors.greens) + } + else{ + color = UtilsIos.getColor(Colors.flowers) + } + + atributedString.append(getString(" \(diferencia.cantidad!.intValue)", color: color!)) + + labelDisponible.attributedText = atributedString + + labelDisponible.isHidden = false + + } + else + { + labelDisponible.isHidden = true + } + } + + func getString(_ value: String, color: UIColor) -> NSMutableAttributedString + { + let myMutableString = NSMutableAttributedString(string: value) + + myMutableString.addAttribute(NSForegroundColorAttributeName, value: color, range: NSRange(location:0,length: value.characters.count)) + + return myMutableString + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecioRecalculado.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecioRecalculado.xib new file mode 100644 index 0000000..09f694a --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecioRecalculado.xib @@ -0,0 +1,57 @@ + + + + + + + + + + Raleway + Raleway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecios.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecios.swift new file mode 100644 index 0000000..2ab9d2d --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecios.swift @@ -0,0 +1,35 @@ +// +// CeldaPrecios.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 10/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CeldaPrecios: UITableViewCell { + + @IBOutlet weak var labelCantidad: UILabel! + @IBOutlet weak var labelPrecio: UILabel! + @IBOutlet weak var labelComprados: UILabel! + @IBOutlet weak var labelX: UILabel! + + func pintarCelda(_ cantidad: String, precio: String, comprados: String) + { + labelCantidad.text = cantidad + labelComprados.text = comprados + if(ControllerPreferences.mostrarPrecios()) + { + labelPrecio.text = precio + } + else + { + labelPrecio.text = " " + labelX.text = " " + labelCantidad.textAlignment = NSTextAlignment.center + } + + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecios.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecios.xib new file mode 100644 index 0000000..f9e7099 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaPrecios.xib @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + Raleway + + + Raleway-SemiBold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaString.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaString.swift new file mode 100644 index 0000000..b501be9 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaString.swift @@ -0,0 +1,28 @@ +// +// CeldaString.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class CeldaString: UITableViewCell { + + @IBOutlet weak var texto: UILabel! + + func pintarCelda(_ label: String, color: UIColor?) { + self.texto.text = label + if(color != nil) + { + self.backgroundColor = color + } + } + + func tintarCelda(_ color: UInt) + { + self.texto.textColor = UtilsIos.getColor(color) + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaString.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaString.xib new file mode 100644 index 0000000..a8c5343 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaString.xib @@ -0,0 +1,44 @@ + + + + + + + + + + Raleway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaTicketRecibido.swift b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaTicketRecibido.swift new file mode 100644 index 0000000..966d7e6 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaTicketRecibido.swift @@ -0,0 +1,26 @@ +// +// CeldaTicketRecibido.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/3/17. +// Copyright © 2017 Nelo Sanchez Gomiz. All rights reserved. +// + +import Foundation +import BaseLibrary + +class CeldaTicketRecibido: UITableViewCell { + + @IBOutlet weak var agency: UILabel! + @IBOutlet weak var date: UILabel! + @IBOutlet weak var total: UILabel! + + func pintarCelda(agency: String, date: String, total: NSNumber) + { + self.agency.text = agency + self.date.text = date + self.total.text = "\(total.doubleValue)€" + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaTicketRecibido.xib b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaTicketRecibido.xib new file mode 100644 index 0000000..2b24e6e --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Celdas/CeldaTicketRecibido.xib @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + Raleway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdBuscarArticulos.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdBuscarArticulos.swift new file mode 100644 index 0000000..f924d67 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdBuscarArticulos.swift @@ -0,0 +1,31 @@ +// +// CmdBuscarArticulos.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdBuscarArticulos: CommandBaseVentas { + + var cadena: String?, fecha: String? + var articulos: Array? + var cid: NSNumber?, aid: NSNumber? + + init(cadena: String, f: String, consignatario: NSNumber, agencia: NSNumber) + { + super.init() + self.cadena = cadena + self.fecha = f + self.cid = consignatario + self.aid = agencia + } + + override func execute() throws { + articulos = try ventas.BuscarArticulos(cadena!, f: fecha!, consignatario: cid!, agencia: aid!) + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdBuscarClientes.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdBuscarClientes.swift new file mode 100644 index 0000000..5c297af --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdBuscarClientes.swift @@ -0,0 +1,24 @@ +// +// CmdBuscarClientes.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdBuscarClientes: CommandBaseVentas { + + var cliente: String = "" + var clientes = Array() + + init(c: String) { + cliente = c + } + + override func execute() throws { + clientes = try ventas.BuscarClientes(cliente) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdCheckMovimientos.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdCheckMovimientos.swift new file mode 100644 index 0000000..200d555 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdCheckMovimientos.swift @@ -0,0 +1,30 @@ +// +// CmdCheckMovimientos.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/3/17. +// Copyright © 2017 Nelo Sanchez Gomiz. All rights reserved. +// + +import Foundation +class CmdCheckMovimientos: CommandBaseVentas{ + + var movimientos: Array + + init(m: Array){ + movimientos = m; + } + + + override func execute() throws { + var movimientosJson: Array> = [] + + for mov in movimientos + { + let m = mov.toJson() + movimientosJson.append(m) + } + try ventas.CheckMovimientos(movimientos: movimientosJson) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdCrearOrder.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdCrearOrder.swift new file mode 100644 index 0000000..4aaf420 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdCrearOrder.swift @@ -0,0 +1,29 @@ +// +// CmdCrearOrder.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 10/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdCrearOrder: CommandBaseVentas { + + var order: Order? + + + init(p: Order) + { + super.init() + order = p + self.errorMessage = NSLocalizedString("error_crear_order", comment: "") + } + + override func execute() throws { + order = ControllerPedido.rellenarDatosOrder() + order = try ventas.CrearOrder(order!.toJson() as NSDictionary) + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdLogin.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdLogin.swift new file mode 100644 index 0000000..8332760 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdLogin.swift @@ -0,0 +1,32 @@ +// +// CmdLogin.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdLogin: CommandBaseVentas{ + + var User: String? + var Pass: String? + let security = SecurityFacade.instance + var Cliente: ClienteVentas? + + + init(User: String, Pass: String) + { + super.init() + self.User = User + self.Pass = Pass + self.errorMessage = NSLocalizedString("error_login", comment: "") + } + + override func execute() throws { + try security.Login(User!, Pass: Pass!) + self.Cliente = try ventas.ObtenerCliente(User!, Pass: Pass!) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdModificarCliente.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdModificarCliente.swift new file mode 100644 index 0000000..26fadd3 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdModificarCliente.swift @@ -0,0 +1,26 @@ +// +// CmdModificarCliente.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdModificarCliente: CommandBaseVentas { + + var cliente: ClienteVentas? + + init(cv: ClienteVentas) + { + super.init() + self.cliente = cv + self.errorMessage = NSLocalizedString("error_cliente", comment: "") + } + + override func execute() throws { + try ventas.ModificarCliente((cliente?.toJson())! as NSDictionary) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdModificarPassword.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdModificarPassword.swift new file mode 100644 index 0000000..3e6af59 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdModificarPassword.swift @@ -0,0 +1,28 @@ +// +// CmdModificarPassword.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 1/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdModificarPassword: CommandBaseVentas { + + var password: String? + var cid: NSNumber? + let security = SecurityFacade.instance + + init(password: String, cid: NSNumber) + { + super.init() + self.password = password + self.cid = cid + self.errorMessage = NSLocalizedString("error_password", comment: "") + } + + override func execute() throws { + try security.ModificarPassword(password!, cid: cid!) + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerAgencias.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerAgencias.swift new file mode 100644 index 0000000..1ecaff4 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerAgencias.swift @@ -0,0 +1,32 @@ +// +// CmdObtenerAgencias.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdObtenerAgencias: CommandBaseVentas { + + var Consignatario: NSNumber? + var Fecha: String? + var agencias: Array? + var vistas: Array? + + init(c: NSNumber, f: String) + { + super.init() + self.Fecha = f + self.Consignatario = c + self.errorMessage = NSLocalizedString("error_agencias", comment: "") + } + + override func execute() throws { + vistas = try ventas.ObtenerVistas() + agencias = try ventas.ObtenerAgencias(Fecha!, consignatario: Consignatario!) + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerArticuloVenta.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerArticuloVenta.swift new file mode 100644 index 0000000..bdc747f --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerArticuloVenta.swift @@ -0,0 +1,33 @@ +// +// CmdObtenerArticuloVenta.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdObtenerArticuloVenta: CommandBaseVentas { + + var fecha: String? + var consignatario: NSNumber?, agencia: NSNumber?, tipo: NSNumber?, itemId: NSNumber?, warehouseId: NSNumber? + var articulo: ArticuloVentasTags? + + init(f: String , c: NSNumber , a: NSNumber, t: NSNumber, iid: NSNumber, wid: NSNumber) + { + super.init() + self.fecha = f + self.consignatario = c + self.agencia = a + self.tipo = t + self.itemId = iid + self.warehouseId = wid + self.errorMessage = NSLocalizedString("error_articulo", comment: "") + } + + override func execute() throws { + articulo = try ventas.ObtenerArticuloVenta(fecha!, consignatario: consignatario!, agencia: agencia!, tipo: tipo!, itemId: itemId!, warehouseId: warehouseId!) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerClienteById.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerClienteById.swift new file mode 100644 index 0000000..147062e --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerClienteById.swift @@ -0,0 +1,24 @@ +// +// CmdObtenerClienteById.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdObtenerClienteById: CommandBaseVentas { + + var Id_Cliente: NSNumber? = 0 + var cliente: ClienteVentas? + + init(c: NSNumber) { + Id_Cliente = c + } + + override func execute() throws { + cliente = try ventas.ObtenerClienteById(Id_Cliente!) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerCreditoRiesgo.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerCreditoRiesgo.swift new file mode 100644 index 0000000..2b68008 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerCreditoRiesgo.swift @@ -0,0 +1,26 @@ +// +// CmdObtenerCreditoRiesgo.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 23/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdObtenerCreditoRiesgo: CommandBaseVentas { + + var cliente: ClienteVentas? + + init(c: ClienteVentas) + { + super.init() + cliente = c + self.errorMessage = NSLocalizedString("error_riesgo", comment: "") + } + + override func execute() throws { + cliente = try ventas.ObtenerCreditoRiesgo(cliente!.toJson() as NSDictionary) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerDatosPasarBanco.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerDatosPasarBanco.swift new file mode 100644 index 0000000..9e3cfe1 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerDatosPasarBanco.swift @@ -0,0 +1,30 @@ +// +// CmdObtenerDatosPasarBanco.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 23/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdObtenerDatosPasarBanco: CommandBaseVentas { + + var cantidad: NSNumber? = 0 + var fecha: String? = "" + var cliente: NSNumber? = 0 + var datos: DatosPasarBanco? + + init(c: NSNumber, f: String, cli: NSNumber) { + super.init() + cantidad = c + fecha = f + cliente = cli + self.errorMessage = NSLocalizedString("error_banco", comment: "") + } + + override func execute() throws { + datos = try ventas.ObtenerDatosPasarBanco(cantidad!, fecha: fecha!, cliente: cliente!) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerPedidos.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerPedidos.swift new file mode 100644 index 0000000..9c27efb --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerPedidos.swift @@ -0,0 +1,28 @@ +// +// CmdObtenerPedidosRealizados.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdObtenerPedidos: CommandBaseVentas { + + var orders: Array? + var cliente: NSNumber? + + init(cliente: NSNumber) { + super.init() + self.cliente = cliente + self.errorMessage = NSLocalizedString("error_pedidos", comment: "") + } + + override func execute() throws { + + orders = try ventas.ObtenerPedidos(cliente!) + + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerPedidosPendientes.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerPedidosPendientes.swift new file mode 100644 index 0000000..4c27964 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerPedidosPendientes.swift @@ -0,0 +1,26 @@ +// +// CmdObtenerPedidosPendientes.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 21/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdObtenerPedidosPendientes: CommandBaseVentas { + + var cliente: NSNumber? + var orders: Array? + + init(cliente: NSNumber){ + super.init() + self.cliente = cliente + self.errorMessage = NSLocalizedString("error_pedidos_pendientes", comment: "") + } + + override func execute() throws { + orders = try ventas.ObtenerPedidosPendientes(cliente!) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerStock.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerStock.swift new file mode 100644 index 0000000..e93c4a2 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerStock.swift @@ -0,0 +1,35 @@ +// +// CmdObtenerStock.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 28/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdObtenerStock: CommandBaseVentas { + + var fecha: String?, cadena: String? + var consignatario: NSNumber?, agencia: NSNumber?, tipo: NSNumber? + var articulos: Array? + + init(f: String, c: NSNumber, a: NSNumber, t: NSNumber, cad: String) + { + super.init() + self.fecha = f + self.consignatario = c + self.agencia = a + self.tipo = t + self.cadena = cad + if(self.cadena == ""){ + cadena = nil + } + self.errorMessage = NSLocalizedString("error_stock", comment: "") + } + + override func execute() throws { + articulos = try ventas.ObtenerStock(fecha!, consignatario: consignatario!, agencia: agencia!, tipo: tipo!, cadena: cadena) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerTipos.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerTipos.swift new file mode 100644 index 0000000..d8c2d3e --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdObtenerTipos.swift @@ -0,0 +1,36 @@ +// +// CmdObtenerTipos.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 27/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdObtenerTipos: CommandBaseVentas { + + var tipos: Array = [] + var agencia: NSNumber?, consignatario: NSNumber?, reino: NSNumber? + var cadena: String? = "" + var fecha: String? + var articulo: ArticuloVentasTags? + + init(r: NSNumber, c: String , a: NSNumber, con: NSNumber, f: String) + { + super.init() + self.reino = r + self.cadena = c + self.fecha = f + self.agencia = a + self.consignatario = con + self.errorMessage = NSLocalizedString("error_familias", comment: "") + } + + + override func execute() throws { + tipos = try ventas.BuscarTipos(cadena!, agencia: agencia!, consignatario: consignatario!, fecha: fecha!, reino: reino!) + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdRecalcularPrecios.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdRecalcularPrecios.swift new file mode 100644 index 0000000..db834da --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdRecalcularPrecios.swift @@ -0,0 +1,26 @@ +// +// CmdRecalcularPrecios.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 17/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdRecalcularPrecios: CommandBaseVentas { + + var order: Order? + + override init() { + super.init() + self.errorMessage = NSLocalizedString("error_recalcular", comment: "") + } + + override func execute() throws { + order = ControllerPedido.rellenarDatosOrder() + + order = try ventas.RecalcularPrecios(order!.toJson() as NSDictionary) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdRecuperarPedido.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdRecuperarPedido.swift new file mode 100644 index 0000000..c1e69b9 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdRecuperarPedido.swift @@ -0,0 +1,27 @@ +// +// CmdRecuperarPedido.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 16/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdRecuperarPedido: CommandBaseVentas { + + var orderResumen: OrderResumen? + var order: Order? + + init(o: OrderResumen) + { + super.init() + orderResumen = o + self.errorMessage = NSLocalizedString("error_recuperar_pedido", comment: "") + } + + override func execute() throws { + order = try ventas.RecuperarOrder((orderResumen?.toJson())! as NSDictionary) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdSplitOrder.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdSplitOrder.swift new file mode 100644 index 0000000..91a7cef --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdSplitOrder.swift @@ -0,0 +1,26 @@ +// +// CmdSplitOrder.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 23/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdSplitOrder: CommandBaseVentas { + + var order: Order? + + init(o: Order) + { + super.init() + order = o + self.errorMessage = NSLocalizedString("error_split_order", comment: "") + } + + override func execute() throws { + order = try ventas.SplitOrder(order!.toJson() as NSDictionary) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdTransactionEnd.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdTransactionEnd.swift new file mode 100644 index 0000000..b27cfba --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdTransactionEnd.swift @@ -0,0 +1,27 @@ +// +// CmdTransactionEnd.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 23/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdTransactionEnd: CommandBaseVentas { + + var status: String? = "" + var transaction: NSNumber? = 0 + + init(s: String, t: NSNumber) + { + super.init() + status = s + transaction = t + self.errorMessage = NSLocalizedString("error_transaccion", comment: "") + } + + override func execute() throws { + try ventas.FinalizarTransaccion(status!, Id: transaction!) + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CmdVerificarAgencia.swift b/Verdnaturaventas/Verdnaturaventas/Command/CmdVerificarAgencia.swift new file mode 100644 index 0000000..d6e05be --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CmdVerificarAgencia.swift @@ -0,0 +1,30 @@ +// +// CmdVerificarAgencia.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 17/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class CmdVerificarAgencia: CommandBaseVentas { + + var consigna: NSNumber?, agencia: NSNumber? + var fecha: String? + var agenciaValida: Bool? + + init(consigna: NSNumber, agencia: NSNumber, fecha: String) + { + super.init() + self.consigna = consigna + self.agencia = agencia + self.fecha = fecha + self.errorMessage = NSLocalizedString("error_verificar_agencia", comment: "") + } + + override func execute() throws { + agenciaValida = try ventas.VerificarAgencia(consigna!, agencia: agencia!, fecha: fecha!) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Command/CommandBaseVentas.swift b/Verdnaturaventas/Verdnaturaventas/Command/CommandBaseVentas.swift new file mode 100644 index 0000000..8ecd272 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Command/CommandBaseVentas.swift @@ -0,0 +1,16 @@ +// +// CommandBase.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class CommandBaseVentas: CommandBase { + + let ventas = FacadeVentas.instance + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Controller/ControllerArticulo.swift b/Verdnaturaventas/Verdnaturaventas/Controller/ControllerArticulo.swift new file mode 100644 index 0000000..baa992f --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Controller/ControllerArticulo.swift @@ -0,0 +1,51 @@ +// +// ControllerArticulo.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 8/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +// FIXME: comparison operators with optionals were removed from the Swift Standard Libary. +// Consider refactoring the code to use the non-optional operators. +fileprivate func < (lhs: T?, rhs: T?) -> Bool { + switch (lhs, rhs) { + case let (l?, r?): + return l < r + case (nil, _?): + return true + default: + return false + } +} + +// FIXME: comparison operators with optionals were removed from the Swift Standard Libary. +// Consider refactoring the code to use the non-optional operators. +fileprivate func > (lhs: T?, rhs: T?) -> Bool { + switch (lhs, rhs) { + case let (l?, r?): + return l > r + default: + return rhs < lhs + } +} + + +class ControllerArticulo: NSObject { + + static func getMinPrice(_ articulo: ArticuloVentasTags) -> Double + { + var price: Double? = nil + for tarifa in articulo.tarifas! + { + if(price == nil || price > tarifa.price?.doubleValue) + { + price = tarifa.price?.doubleValue + } + } + + return price! + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Controller/ControllerPedido.swift b/Verdnaturaventas/Verdnaturaventas/Controller/ControllerPedido.swift new file mode 100644 index 0000000..e41c808 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Controller/ControllerPedido.swift @@ -0,0 +1,294 @@ +// +// ControllerPedido.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 20/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class ControllerPedido: NSObject { + + static func getConsignatarioDefecto() -> Consignatario? + { + let consignatarios = getConsignatarios() + + if(consignatarios != nil) + { + for c in consignatarios! + { + if(c.predeterminada != 0) + { + return c + } + } + } + + return nil + } + + static func getConsignatarios() -> Array? + { + let cliente = getPedido().cliente + return (cliente?.Consignatarios)! + } + + static func getPedido() -> Order { + let app = UIApplication.shared.delegate! as! AppDelegate + return app.pedido! + } + + fileprivate static func getCliente() -> ClienteVentas + { + let app = UIApplication.shared.delegate! as! AppDelegate + return app.cliente! + } + + static func comprobarSeleccionCliente() -> Bool + { + let cliente = getCliente() + let pedido = getPedido() + + if(cliente.Tipo == "trabajador" && pedido.cliente == nil && pedido.consignatarioActivo == nil) { + return false + } + return true + } + + static func generarDatos(_ a: ArticuloVentasTags) -> Array + { + var datos = Array() + + for t in a.tarifas! + { + datos.append(generateDato(nil, t: t, a: a)) + } + + return datos + } + + static func generateDato(_ dato: DatosCompra?, t: Tarifa?, a: ArticuloVentasTags?) ->DatosCompra + { + var t = t, a = a + let da = DatosCompra() + + if(dato != nil) + { + t = (dato?.tarifa)! + a = (dato?.articulo)! + da.Cantidad = dato!.Cantidad + da.Precio = dato!.Precio + da.grouping = dato!.grouping + da.Especificaciones = dato!.Especificaciones + } + else{ + da.Cantidad = t!.grouping + da.Precio = t!.price + da.grouping = a!.available + } + + da.articulo = a + da.tarifa = t + da.items = t!.items + + return da + } + + static func comprar(_ dato: DatosCompra) + { + let pedido = getPedido() + var row = buscarRow(dato) + if(row == nil) { + row = OrderRow() + row!.tarifa = dato.tarifa + row!.amount = dato.Cantidad + let a = dato.articulo + a?.ArticulosSimilares = [] + a?.ArticulosComprados = [] + row!.articulo = a + pedido.rows?.append(row!) + } + else + { + row!.amount = NSNumber(value: row!.amount!.intValue + dato.Cantidad!.intValue as Int) + } + + } + + fileprivate static func buscarRow(_ dato: DatosCompra) -> OrderRow? + { + let pedido = getPedido() + for row in pedido.rows!{ + if(row.articulo!.Id_Article! == dato.articulo!.Id_Article && row.tarifa!.rate + == dato.tarifa!.rate && dato.tarifa!.warehouse_id! == dato.tarifa!.warehouse_id!) + { + return row + + } + + } + return nil + } + + static func borrarCompra(_ dato: DatosCompra) + { + let pedido = getPedido() + let row = buscarRow(dato) + if(row != nil) { + row?.amount = NSNumber(value: (row?.amount!.intValue)! - dato.Cantidad!.intValue as Int) + if(row?.amount == 0) + { + let position = pedido.rows!.index(of: row!) + pedido.rows!.remove(at: position!) + } + } + + } + + static func buscarRowRate3(_ dato: DatosCompra) -> OrderRow? + { + let pedido = getPedido() + for row in pedido.rows!{ + if(row.articulo!.Id_Article! == dato.articulo!.Id_Article && row.tarifa!.rate == 3 + && dato.tarifa!.warehouse_id! == dato.tarifa!.warehouse_id!) + { + return row + + } + + } + return nil + } + + static func rellenarDatosOrder() -> Order + { + let order = getPedido() + + order.customer_id = order.cliente!.Id_Cliente + order.delivery_method_id = order.agencia!.Vista + order.agency_id = order.agencia!.Id_Agencia + order.address_id = order.consignatarioActivo?.Id_Consigna + order.source_app = "IOS" + + return order; + } + + static func getDiferencias(_ rows: Array) -> Array + { + var listDiference = Array() + let pedido = getPedido() + + for or in rows { + for r in pedido.rows! { + if(or.articulo!.Id_Article!.intValue == r.articulo!.Id_Article!.intValue + && or.tarifa!.warehouse_id!.intValue == r.tarifa!.warehouse_id!.intValue + && or.tarifa!.rate!.intValue == r.tarifa!.rate!.intValue) + { + let diference = OrderDiference() + if(or.tarifa!.price! != r.tarifa!.price!) + { + diference.price = or.tarifa!.price! + diference.oldPrice = r.tarifa!.price! + diference.articulo = "\(or.articulo!.Article!)" + diference.escribirPrecio = true + } + + if(or.amount!.intValue < r.amount!.intValue) + { + diference.cantidad = or.amount! + diference.oldCantidad = r.amount! + diference.articulo! = "\(or.articulo!.Article!) " + diference.escribirDisponible = true + } + + if(diference.articulo! != "") + { + listDiference.append(diference) + } + } + } + } + + return listDiference + } + + static func cambiarCliente(_ cliente: ClienteVentas) + { + let pedido = getPedido() + pedido.cliente = cliente + pedido.consignatarioActivo = getConsignatarioDefecto() + pedido.agencia = nil + } + + static func vaciarCarrito() + { + for r in getPedido().rows! + { + r.amount = 0 + } + } + + static func reiniciarPedido() + { + let app = UIApplication.shared.delegate! as! AppDelegate + app.pedido = Order() + app.pedido!.cliente = app.cliente + app.pedido!.consignatarioActivo = ControllerPedido.getConsignatarioDefecto() + app.pedido!.Fecha = UtilDate.dateToString(UtilDate.addDays(Date(), days: 1)) + } + + static func reiniciarRecuperarPedido() + { + let app = UIApplication.shared.delegate! as! AppDelegate + let cliente = app.pedido!.cliente! + app.pedido = Order() + app.pedido!.cliente = cliente + app.pedido!.consignatarioActivo = ControllerPedido.getConsignatarioDefecto() + app.pedido!.Fecha = UtilDate.dateToString(UtilDate.addDays(Date(), days: 1)) + } + + static func updateRow(_ row: OrderRow) + { + let pedido = getPedido() + pedido.rowsOld = pedido.rows + + for r in pedido.rows! + { + if(r.id! == row.id!) + { + r.amount = row.amount! + break + } + } + + } + + static func obtenerCliente() -> ClienteVentas + { + let app = UIApplication.shared.delegate! as! AppDelegate + let pedido = getPedido() + if(pedido.cliente != nil) + { + return pedido.cliente! + } + else{ + return app.cliente! + } + } + + static func modificarCliente(_ cliente: ClienteVentas) + { + let app = UIApplication.shared.delegate! as! AppDelegate + let pedido = getPedido() + if(pedido.cliente != nil) + { + pedido.cliente = cliente + } + else{ + app.cliente! = cliente + } + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Controller/ControllerPreferences.swift b/Verdnaturaventas/Verdnaturaventas/Controller/ControllerPreferences.swift new file mode 100644 index 0000000..37da7f7 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Controller/ControllerPreferences.swift @@ -0,0 +1,80 @@ +// +// ControllerPreferences.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 11/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class ControllerPreferences: NSObject { + + static func saveUser(_ user: String, pass: String) { + UserDefaults.standard.set(user, forKey: "user") + let pass64 = codificarBase64(pass) + UserDefaults.standard.set(pass64, forKey: "pass") + } + + static func recuperarUsuario() -> String + { + if UserDefaults.standard.object(forKey: "user") != nil { + return UserDefaults.standard.object(forKey: "user") as! String + } + + return "" + } + + static func recuperarPassword() -> String + { + if UserDefaults.standard.object(forKey: "pass") != nil{ + let pass64 = UserDefaults.standard.object(forKey: "pass") as? String + let data = Data(base64Encoded: pass64!, options: NSData.Base64DecodingOptions(rawValue: 0)) + return String(data: data!, encoding: String.Encoding.utf8)! + } + + return "" + } + + static func codificarBase64(_ passwd: String) -> String + { + let data = (passwd as NSString).data(using: String.Encoding.utf8.rawValue) + return data!.base64EncodedString(options: NSData.Base64EncodingOptions(rawValue: 0)) + } + + static func borrarUsuario() + { + UserDefaults.standard.removeObject(forKey: "user") + UserDefaults.standard.removeObject(forKey: "pass") + } + + static func mostrarPrecios() -> Bool{ + if UserDefaults.standard.object(forKey: "precios") != nil { + let precios = UserDefaults.standard.object(forKey: "precios") as? Bool + return precios! + } + + return true + } + + static func setMostrarPrecios(_ precios: Bool) + { + UserDefaults.standard.set(!precios, forKey: "precios") + } + + static func getNotificaciones() -> Bool + { + if UserDefaults.standard.object(forKey: "notifications") != nil + { + return UserDefaults.standard.object(forKey: "notifications") as! Bool + } + + return false + } + + static func setNotificaciones() + { + + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Core/CardImage.swift b/Verdnaturaventas/Verdnaturaventas/Core/CardImage.swift new file mode 100644 index 0000000..8617da7 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Core/CardImage.swift @@ -0,0 +1,33 @@ +// +// CardImage.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 20/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +@IBDesignable +class CardImage: UIImageView { + + @IBInspectable var cornerRadius: CGFloat = 2 + + @IBInspectable var shadowOffsetWidth: Int = 0 + @IBInspectable var shadowOffsetHeight: Int = 3 + @IBInspectable var shadowColor: UIColor? = UIColor.black + @IBInspectable var shadowOpacity: Float = 0.5 + + override func layoutSubviews() { + layer.cornerRadius = cornerRadius + let shadowPath = UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius) + + layer.masksToBounds = false + layer.shadowColor = shadowColor?.cgColor + layer.shadowOffset = CGSize(width: shadowOffsetWidth, height: shadowOffsetHeight); + layer.shadowOpacity = shadowOpacity + layer.shadowPath = shadowPath.cgPath + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Core/CardView.swift b/Verdnaturaventas/Verdnaturaventas/Core/CardView.swift new file mode 100644 index 0000000..fc67094 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Core/CardView.swift @@ -0,0 +1,33 @@ +// +// CardView.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 20/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + + +@IBDesignable +class CardView: UIView { + + @IBInspectable var cornerRadius: CGFloat = 2 + + @IBInspectable var shadowOffsetWidth: Int = 0 + @IBInspectable var shadowOffsetHeight: Int = 3 + @IBInspectable var shadowColor: UIColor? = UIColor.black + @IBInspectable var shadowOpacity: Float = 0.5 + + override func layoutSubviews() { + layer.cornerRadius = cornerRadius + let shadowPath = UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius) + + layer.masksToBounds = false + layer.shadowColor = shadowColor?.cgColor + layer.shadowOffset = CGSize(width: shadowOffsetWidth, height: shadowOffsetHeight); + layer.shadowOpacity = shadowOpacity + layer.shadowPath = shadowPath.cgPath + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Core/CircleLabel.swift b/Verdnaturaventas/Verdnaturaventas/Core/CircleLabel.swift new file mode 100644 index 0000000..3fd4377 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Core/CircleLabel.swift @@ -0,0 +1,23 @@ +// +// CircleLabel.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 9/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +@IBDesignable +class CircleLabel: UILabel { + + @IBInspectable var cornerRadius: CGFloat = 2 + @IBInspectable var borderWidth: CGFloat = 5.0 + //@IBInspectable var borderColor: CGColor = UIColor.blueColor().CGColor + + override func layoutSubviews() { + layer.cornerRadius = cornerRadius + layer.borderWidth = borderWidth + //layer.borderColor = borderColor + } +} \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Core/ItemTag.swift b/Verdnaturaventas/Verdnaturaventas/Core/ItemTag.swift new file mode 100644 index 0000000..4055bc3 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Core/ItemTag.swift @@ -0,0 +1,21 @@ +// +// itemTag.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 2/8/17. +// Copyright © 2017 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class ItemTag: UIView { + + @IBOutlet weak var labelTag: UILabel! + @IBOutlet weak var labelValue: UILabel! + + func setData(tag: String, val: String){ + labelTag.text = tag + labelValue.text = val + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Core/ItemTag.xib b/Verdnaturaventas/Verdnaturaventas/Core/ItemTag.xib new file mode 100644 index 0000000..25073c0 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Core/ItemTag.xib @@ -0,0 +1,51 @@ + + + + + + + + + + + + + Raleway-Bold + + + Raleway + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Core/MyFileManager.swift b/Verdnaturaventas/Verdnaturaventas/Core/MyFileManager.swift new file mode 100644 index 0000000..77431d4 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Core/MyFileManager.swift @@ -0,0 +1,97 @@ +// +// FileManager.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 28/3/17. +// Copyright © 2017 Nelo Sanchez Gomiz. All rights reserved. +// + +import Foundation + +class MyFileManager { + + static let file = "checks.txt" //this is the file. we will write to and read from it + + private static func writeFile(value: String) { + if let dir = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first { + + let path = dir.appendingPathComponent(file) + do { + try value.write(to: path, atomically: false, encoding: String.Encoding.utf8) + + } + catch { + print(error) + } + } + } + + private static func readFile() -> String{ + var text = "" + if let dir = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first { + + let path = dir.appendingPathComponent(file) + + do { + text = try String(contentsOf: path, encoding: String.Encoding.utf8) + } + catch { + print(error) + } + } + return text + } + + private static func toJson(obj: Any) -> String? { + do { + let data = try JSONSerialization.data(withJSONObject: obj, options: JSONSerialization.WritingOptions(rawValue: 0)) + let json = String(data: data, encoding: String.Encoding.utf8) + + return json + + } catch { + print(error.localizedDescription) + } + return nil + } + + private static func fromJson(json: String) -> Any?{ + if let data = json.data(using: .utf8) { + do { + let obj = try JSONSerialization.jsonObject(with: data, options: []) + return obj + } catch { + print(error.localizedDescription) + } + } + + return nil + } + + static func saveTicketLines(lines: Array){ + var array: Array> = [] + for line in lines { + array.append(line.toJson()) + } + if let json = toJson(obj: array) + { + writeFile(value: json) + } + } + + static func loadTicketLines() -> Array { + let json = readFile() + var array: Array = [] + + if let data = fromJson(json: json) { + for e in (data as! Array) { + let parser = ParserTicketRecepcionLinea() + let linea = parser.parse(e) + array.append(linea) + } + return array + } + return [] + + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Core/TransitionManager.swift b/Verdnaturaventas/Verdnaturaventas/Core/TransitionManager.swift new file mode 100644 index 0000000..201b5a5 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Core/TransitionManager.swift @@ -0,0 +1,73 @@ +// +// TransitionManager.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class TransitionManager: NSObject, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate { + + // MARK: UIViewControllerAnimatedTransitioning protocol methods + + // animate a change from one viewcontroller to another + func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { + // get reference to our fromView, toView and the container view that we should perform the transition in + let container = transitionContext.containerView + let fromView = transitionContext.view(forKey: UITransitionContextViewKey.from)! + let toView = transitionContext.view(forKey: UITransitionContextViewKey.to)! + + // set up from 2D transforms that we'll use in the animation + let offScreenRight = CGAffineTransform(translationX: container.frame.width, y: 0) + let offScreenLeft = CGAffineTransform(translationX: -container.frame.width, y: 0) + + // start the toView to the right of the screen + toView.transform = offScreenRight + + // add the both views to our view controller + container.addSubview(toView) + container.addSubview(fromView) + + // get the duration of the animation + // DON'T just type '0.5s' -- the reason why won't make sense until the next post + // but for now it's important to just follow this approach + let duration = self.transitionDuration(using: transitionContext) + + // perform the animation! + // for this example, just slid both fromView and toView to the left at the same time + // meaning fromView is pushed off the screen and toView slides into view + // we also use the block animation usingSpringWithDamping for a little bounce + UIView.animate(withDuration: duration, delay: 0.0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.8, options: [], animations: { + + fromView.transform = offScreenLeft + toView.transform = CGAffineTransform.identity + + }, completion: { finished in + + // tell our transitionContext object that we've finished animating + transitionContext.completeTransition(true) + + }) + } + + // return how many seconds the transiton animation will take + func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { + return 0.5 + } + + // MARK: UIViewControllerTransitioningDelegate protocol methods + + // return the animataor when presenting a viewcontroller + // remmeber that an animator (or animation controller) is any object that aheres to the UIViewControllerAnimatedTransitioning protocol + func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { + return self + } + + // return the animator used when dismissing from a viewcontroller + func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { + return self + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Core/UIImageViewAsyncVentas.swift b/Verdnaturaventas/Verdnaturaventas/Core/UIImageViewAsyncVentas.swift new file mode 100644 index 0000000..ad61411 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Core/UIImageViewAsyncVentas.swift @@ -0,0 +1,46 @@ +// +// UIImageViewAsyncVentas.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class UIImageViewAsyncVentas: UIImageViewAsync { + + override func getDataFromUrl(_ url:String, completion: @escaping ((_ data: Data?) -> Void)) { + if(verifyUrl(url)){ + URLSession.shared.dataTask(with: URL(string: url)!, completionHandler: { (data, response, error) in + if(data != nil) + { + completion(NSData(data: data!) as Data) + } + }) .resume() + } + else + { + completion(nil) + } + + } + + override func completion(_ data: Data?) + { + if(data != nil) + { + DispatchQueue.main.async { + self.contentMode = self.contentMode + self.image = UIImage(data: data!) + } + } + else + { + self.image = UIImage(named: "noimagen-01") + } + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Dialog/DialogAgencias.swift b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogAgencias.swift new file mode 100644 index 0000000..edb7403 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogAgencias.swift @@ -0,0 +1,186 @@ +// +// ViewAgencias.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class DialogAgencias: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + + @IBOutlet weak var tablaAgencias: UITableView! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + + var vistas: Array = [] + var agencias: Array = [] + var agenciasSeleccionadas: Array = [] + var vista: Vista? + + override func createView() { + super.createView() + progress = progressBar + contenedor = tablaAgencias + let nib = UINib(nibName: "CeldaString", bundle: nil) + tablaAgencias.register(nib, forCellReuseIdentifier: "CeldaString") + tablaAgencias.rowHeight = 50.0 + tablaAgencias.backgroundColor = UIColor.groupTableViewBackground + tablaAgencias.tableFooterView = UIView() + setTitle() + rewriteBackButton() + } + + override func goBack() + { + if(vista != nil) + { + vista = nil + setTitle() + agenciasSeleccionadas = [] + tablaAgencias.reloadData() + } + else + { + _ = self.navigationController?.popViewController(animated: true) + } + } + + override func viewWillAppear(_ animated: Bool) { + obtenerAgencias() + } + + func obtenerAgencias() + { + showProgress(true) + let cmd = CmdObtenerAgencias(c: aplication.pedido!.consignatarioActivo!.Id_Consigna!, f: aplication.pedido!.Fecha!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.vistas = cmd.vistas! + self.agencias = cmd.agencias! + self.tablaAgencias.reloadData() + self.showProgress(false) + self.inicializado = true + }, + handlerRetry: { + self.obtenerAgencias() + }, + handlerAccept: { + _ = self.navigationController?.popViewController(animated: true) + } + ) + self.execute(cmd) + + } + + @IBAction func clickVista(_ sender: UITapGestureRecognizer) { + vista = nil + agenciasSeleccionadas = [] + tablaAgencias.reloadData() + + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + if(vista != nil) + { + if agenciasSeleccionadas.count == 0{ + if inicializado{ + tablaVacia(tablaAgencias, text: NSLocalizedString("mensaje_no_hay_agencias", comment: "")) + return 0 + } + } + else + { + tableView.backgroundView = nil + } + return agenciasSeleccionadas.count + } + else + { + if vistas.count == 0{ + if inicializado{ + tablaVacia(tablaAgencias, text: NSLocalizedString("mensaje_no_hay_agencias", comment: "")) + return 0 + } + } + else + { + tableView.backgroundView = nil + } + return vistas.count + } + + } + + + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaString") as! CeldaString + + if(vista == nil) + { + vistas = vistas.sorted { $0.vista! < $1.vista! } + let vista = vistas[indexPath.row] + celda.pintarCelda(vista.vista!, color: UIColor.white) + } + else + { + agenciasSeleccionadas = agenciasSeleccionadas.sorted { $0.Agencia! < $1.Agencia! } + let agencia = agenciasSeleccionadas[indexPath.row] + celda.pintarCelda(agencia.Agencia!, color: UIColor.white) + } + + return celda + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + if(vista == nil) + { + vista = vistas[indexPath.row] + generateAgency() + tablaAgencias.reloadData() + setTitle() + } + else + { + if(aplication.pedido!.rows!.count > 0) + { + aplication.pedido!.agenciaAntigua = aplication.pedido!.agencia + } + + aplication.pedido?.agencia = agenciasSeleccionadas[indexPath.row] + self.navigationController?.popViewController(animated: true) + } + + } + + func generateAgency() + { + for a in agencias + { + if (a.Vista == vista?.vista_id) + { + agenciasSeleccionadas.append(a) + } + } + } + + func setTitle() + { + if(vista != nil) + { + self.title = vista?.vista + } + else + { + self.title = NSLocalizedString("fragment_seleccion_entrega_cabecera", comment: "") + } + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Dialog/DialogCalendar.swift b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogCalendar.swift new file mode 100644 index 0000000..bd4ad02 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogCalendar.swift @@ -0,0 +1,51 @@ +// +// ViewCalendar.swift +// +// +// Created by Nelo Sanchez Gomiz on 13/1/16. +// +// + +import UIKit +import BaseLibrary +import FSCalendar + +class DialogCalendar: MyViewVentas { + + @IBOutlet weak var calendar: FSCalendar! + + + override func viewDidLoad() { + super.viewDidLoad() + + } + + override func createView() { + self.title = NSLocalizedString("main_arraival", comment: "").lowercased().uppercaseFirst + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + calendar.select(UtilDate.stringToDate((aplication.pedido?.Fecha)!)) + } + + func calendar(_ calendar: FSCalendar!, didSelectDate date: Date!) { + aplication.pedido?.FechaAntigua = aplication.pedido?.Fecha + aplication.pedido?.Fecha = UtilDate.dateToString(date) + aplication.pedido?.agenciaAntigua = aplication.pedido?.agencia + aplication.pedido?.agencia = nil + _ = self.navigationController?.popViewController(animated: true) + } + + func calendar(_ calendar: FSCalendar!, shouldSelectDate date: Date!) -> Bool { + let today = Date() + let selectedDate = UtilDate.addDays(date, days: 1) + if(selectedDate.timeIntervalSinceReferenceDate < today.timeIntervalSinceReferenceDate) + { + return false + + } + return true + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Dialog/DialogConsignatarios.swift b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogConsignatarios.swift new file mode 100644 index 0000000..fb12e57 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogConsignatarios.swift @@ -0,0 +1,50 @@ +// +// ViewConsignatarios.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 21/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class DialogConsignatarios: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + @IBOutlet weak var tablaConsignatarios: UITableView! + + override func createView() { + UtilsIos.registerNib(tablaConsignatarios, cell: "CeldaDobleString") + self.tablaConsignatarios.rowHeight = 65.0 + self.title = NSLocalizedString("main_delivery_address", comment: "").lowercased().uppercaseFirst + tablaConsignatarios.backgroundColor = UIColor.groupTableViewBackground + tablaConsignatarios.tableFooterView = UIView() + } + + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + return (aplication.pedido?.cliente?.Consignatarios?.count)! + } + + + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaDobleString") as! CeldaDobleString + + let consignatario = aplication.pedido?.cliente?.Consignatarios![indexPath.row] + + celda.pintarCelda((consignatario?.Consignatario)!, c: (consignatario?.Domicilio)!, color: UIColor.white) + + return celda + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + aplication.pedido?.consignatarioActivo = aplication.pedido?.cliente?.Consignatarios![indexPath.row] + aplication.pedido?.agenciaAntigua = aplication.pedido?.agencia + aplication.pedido?.agencia = nil + _ = self.navigationController?.popViewController(animated: true) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Dialog/DialogFinalizarPedido.swift b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogFinalizarPedido.swift new file mode 100644 index 0000000..433ee10 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogFinalizarPedido.swift @@ -0,0 +1,64 @@ +// +// DialogFinalizarPedido.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 25/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class DialogFinalizarPedido: MyViewVentas { + + @IBOutlet weak var labelText: UILabel! + @IBOutlet weak var buttonDone: UIBarButtonItem! + var tabview: UIViewController? + + var transaction: String = "" + var deuda: Bool = false + + override func createView() { + labelText.text = getText(false) + buttonDone.title = getText(true) + tabview = self.storyboard!.instantiateViewController(withIdentifier: "TabView") + (tabview as! TabView).selectedIndex = 0 + } + + @IBAction func clickDone(_ sender: AnyObject) { + ControllerPedido.reiniciarPedido() + UIApplication.shared.keyWindow?.rootViewController = tabview! + } + + func getText(_ button: Bool) -> String + { + var text = "" + + if(button) { + if (deuda){ + text = NSLocalizedString("aceptar", comment: "") + } + else{ + text = NSLocalizedString("fragment_finalizar_pedido_aceptar", comment: "") + } + } + else + { + if(deuda && transaction == Values.CALLBACK_PAGO_OK) + { + text = NSLocalizedString("fragment_finalizar_deuda_aceptar", comment: "") + } + if(deuda && transaction != Values.CALLBACK_PAGO_OK){ + text = NSLocalizedString("fragment_finalizar_deuda_error", comment: "") + } + if(!deuda && transaction == Values.CALLBACK_PAGO_OK){ + text = NSLocalizedString("fragment_finalizar_pedido_texto", comment: "") + } + if(!deuda && transaction != Values.CALLBACK_PAGO_OK){ + text = NSLocalizedString("fragment_finalizar_pedido_error", comment: "") + } + } + + return text; + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPagarDeuda.swift b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPagarDeuda.swift new file mode 100644 index 0000000..18242de --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPagarDeuda.swift @@ -0,0 +1,98 @@ +// +// DialogPagarDeuda.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 7/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class DialogPagarDeuda: MyViewVentas { + + @IBOutlet weak var navigation: UINavigationItem! + @IBOutlet weak var labelTitle: UILabel! + @IBOutlet weak var editTotal: UITextField! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + @IBOutlet weak var viewContenedor: UIView! + + var cantidad: Double? = 0.0 + + override func createView() { + super.createView() + progress = progressBar + contenedor = viewContenedor + labelTitle.text = "" + editTotal.text = "0" + } + + override func setTitles() { + self.navigation.title = NSLocalizedString("navigation_panel_pagos", comment: "") + } + + override func viewWillAppear(_ animated: Bool) { + obtenerDeuda() + + } + + @IBAction func clickBack(_ sender: AnyObject) { + dismiss(animated: true, completion: nil) + } + + @IBAction func clickAceptar(_ sender: AnyObject) { + cantidad = Double(editTotal.text!) + if(cantidad != nil && cantidad! > 0.0 && cantidad! <= 3000) + { + launchSegue("segueNavegadorDeuda") + } + } + + + func obtenerDeuda() + { + showProgress(true) + var cliente: ClienteVentas? = nil + if(aplication.pedido!.cliente != nil){ + cliente = aplication.pedido!.cliente + } + else{ + cliente = aplication.cliente! + } + + let cmd = CmdObtenerCreditoRiesgo(c: cliente!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.showProgress(false) + self.cantidad = cmd.cliente!.Riesgo!.doubleValue + if (self.cantidad! > 0.0) { + let roundCantidad = UtilsNumbers.roundDouble(NSNumber(value: self.cantidad!), decimals: 2) + self.labelTitle.text = String(format: NSLocalizedString("total_deuda", comment: ""), String(roundCantidad)) + self.editTotal.text = "\(roundCantidad)" + } else { + self.editTotal.text = "0" + self.labelTitle.text = NSLocalizedString("no_deuda", comment: "") + } + }, + handlerRetry: { + self.obtenerDeuda() + }, + handlerAccept: { + self.dismiss(animated: true, completion: nil) + } + ) + + execute(cmd) + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier == "segueNavegadorDeuda") + { + let vc = segue.destination as! ViewNavegador + vc.deuda = true + vc.cantidad = NSNumber(value: cantidad! as Double) + } + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPrecios.swift b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPrecios.swift new file mode 100644 index 0000000..447cae8 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPrecios.swift @@ -0,0 +1,203 @@ +// +// ViewPrecios.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 9/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class DialogPrecios: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + @IBOutlet weak var tablaPrecios: UITableView! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + + var ejecutando = false + var articulo: ArticuloVentasTags? + var datos = Array() + var datosSalvados = Array() + + override func createView() { + super.createView() + contenedor = tablaPrecios + progress = progressBar + UtilsIos.registerNib(tablaPrecios, cell: "CeldaPrecios") + datos = ControllerPedido.generarDatos(articulo!) + tablaPrecios.rowHeight = 71 + tablaPrecios.backgroundColor = UIColor.groupTableViewBackground + tablaPrecios.tableFooterView = UIView() + } + + + @IBAction func clickTrash(_ sender: AnyObject) { + if(!ejecutando) + { + datosSalvados = [] + for d in datos{ + d.Especificaciones = "" + tablaPrecios.reloadData() + } + } + + } + + + @IBAction func clickDone(_ sender: AnyObject) { + if(!ejecutando) + { + AgregarLinea() + } + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + return datos.count + } + + + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaPrecios") as! CeldaPrecios + let dato = datos[indexPath.row] + celda.pintarCelda("\(dato.Cantidad!.intValue)", precio: "\(UtilsNumbers.roundDouble(dato.Precio!, decimals: 2))€", comprados: dato.Especificaciones!) + + + return celda + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let dato = datos[indexPath.row] + clickComprar(dato) + } + + func clickComprar(_ dato: DatosCompra) + { + var cantidad = 0 + let row = ControllerPedido.buscarRowRate3(dato) + + if(row != nil) + { + let alert = AlertRate(v: self) + alert.showDialog() + } + else{ + for row in (aplication.pedido?.rows)! + { + if(row.articulo == dato.articulo) + { + cantidad = row.amount!.intValue + } + } + + if(getCantidadTotal() + (dato.Cantidad?.intValue)! + cantidad <= (articulo?.available?.intValue)!) { + addDatoCompra(dato) + mostrarValores(dato) + tablaPrecios.reloadData() + } + else + { + let alert = AlertStock(v: self) + alert.showDialog() + } + + } + } + + func mostrarValores(_ dato: DatosCompra) + { + var cantidad = 0 + + for d in datosSalvados { + if(dato.tarifa == d.tarifa) { + dato.Especificaciones = String(format: NSLocalizedString("dialog_comprar_bought", comment: ""), arguments: [d.Cantidad!.intValue]) + } + cantidad += (d.Cantidad?.intValue)! + } + + } + + func addDatoCompra(_ dato: DatosCompra) + { + var existe = false + + for d in datosSalvados { + if dato.tarifa == d.tarifa { + let cantidad = (dato.Cantidad?.intValue)! + (d.Cantidad?.intValue)! + d.Cantidad = NSNumber(value: cantidad as Int) + existe = true + break + } + } + + if(!existe) + { + let da = ControllerPedido.generateDato(dato, t: nil, a: nil) + datosSalvados.append(da) + } + + } + + func getCantidadTotal() -> Int + { + var cantidad = 0; + for d in datosSalvados { + cantidad += (d.Cantidad?.intValue)! + } + + return cantidad + } + + func setTaps(_ image: UIImageView, tapAction: Selector) + { + let singleTap = UITapGestureRecognizer(target: self, action: tapAction) + singleTap.numberOfTapsRequired = 1 + image.isUserInteractionEnabled = true + image.addGestureRecognizer(singleTap) + + } + + func AgregarLinea() + { + prepareOrder(true) + for d in datosSalvados{ + ControllerPedido.comprar(d) + } + let cmd = CmdCrearOrder(p: aplication.pedido!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.aplication.pedido = cmd.order + _ = self.navigationController?.popViewController(animated: true) + }, + handlerRetry: { + for d in self.datosSalvados + { + ControllerPedido.borrarCompra(d) + self.AgregarLinea() + } + + }, + handlerAccept: { + for d in self.datosSalvados + { + ControllerPedido.borrarCompra(d) + } + self.prepareOrder(false) + } + ) + execute(cmd); + } + + func prepareOrder(_ show: Bool) + { + showProgress(show) + ejecutando = show + } + + override func viewWillDisappear(_ animated: Bool) { + refrescarCarrito() + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Dialog/DialogValidarPedido.swift b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogValidarPedido.swift new file mode 100644 index 0000000..b395813 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogValidarPedido.swift @@ -0,0 +1,124 @@ +// +// DialogFinalizarPedido.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 23/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class DialogValidarPedido: MyViewVentas { + + + @IBOutlet weak var labelText: UILabel! + @IBOutlet weak var labelTotal: UILabel! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + @IBOutlet weak var viewContenedor: UIView! + @IBOutlet weak var navigation: UINavigationItem! + + override func createView() { + super.createView() + labelTotal.text = "\(UtilsNumbers.roundDouble(aplication.pedido!.TotalConIva!, decimals: 2))€" + progress = progressBar + contenedor = viewContenedor + getRiesgo() + } + + override func setTitles() { + labelText.text = NSLocalizedString("total_mas_iva", comment: "") + navigation.title = NSLocalizedString("navigation_carrito_validar_compra", comment: "") + } + + @IBAction func clickBack(_ sender: AnyObject) { + self.dismiss(animated: true, completion: nil) + } + + @IBAction func clickAccept(_ sender: AnyObject) { + splitOrder() + } + + func splitOrder() + { + showProgress(true) + let cmd = CmdSplitOrder(o: aplication.pedido!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.showProgress(false) + self.comprobarCredito() + }, + handlerRetry: { + self.showProgress(false) + self.splitOrder() + }, + handlerAccept: { + self.showProgress(false) + self.dismiss(animated: true, completion: nil) + } + ) + execute(cmd) + } + + func comprobarCredito() + { + var tieneCredito = false + + if(aplication.pedido!.cliente!.Credito!.doubleValue >= aplication.pedido!.cliente!.Riesgo!.doubleValue + aplication.pedido!.TotalConIva!.doubleValue) + { + tieneCredito = true + } + + if(tieneCredito) + { + launchSegue("segueValidarFinalizar", sender: Values.CALLBACK_PAGO_OK as AnyObject?) + } + else + { + let deuda = aplication.pedido!.cliente!.Riesgo!.doubleValue - aplication.pedido!.cliente!.Credito!.doubleValue + let total = aplication.pedido!.TotalConIva!.doubleValue + deuda + launchSegue("segueWeb", sender: total as AnyObject?) + } + } + + func getRiesgo() + { + showProgress(true) + let cmd = CmdObtenerCreditoRiesgo(c: aplication.pedido!.cliente!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.aplication.pedido!.cliente = cmd.cliente! + self.showProgress(false) + }, + handlerRetry: { + self.showProgress(false) + self.getRiesgo() + }, + handlerAccept: { + self.dismiss(animated: true, completion: nil) + } + ) + execute(cmd) + + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier == "segueWeb") + { + let vc = segue.destination as! ViewNavegador + vc.cantidad = NSNumber(value: sender as! Double as Double) + vc.fecha = aplication.pedido!.Fecha! + vc.cliente = aplication.pedido!.cliente!.Id_Cliente! + } + else if (segue.identifier == "segueValidarFinalizar") + { + let vc = segue.destination as! DialogFinalizarPedido + vc.transaction = sender as! String + } + } + + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Facade/Commands.swift b/Verdnaturaventas/Verdnaturaventas/Facade/Commands.swift new file mode 100644 index 0000000..a1dae8d --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Facade/Commands.swift @@ -0,0 +1,80 @@ +// +// Commands.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class Commands: NSObject { + + static let login = "login" + + static let obtener_reinos = "obtener_reinos" + + static let obtener_cliente = "obtener_cliente" + + static let obtener_cliente_by_id = "obtener_cliente_by_id" + + static let obtener_consignatarios = "obtener_consignatarios" + + static let obtener_agencias = "obtener_agencias" + + static let obtener_tipos = "obtener_tipos" + + static let obtener_stock_tags = "obtener_stock_tags" + + static let obtener_articulo_ventas = "obtener_articulo_ventas" + + static let recalcular_precios = "recalcular_precios" + + static let modificar_password = "modificar_password" + + static let modificar_cliente = "modificar_cliente" + + static let buscar_articulos = "buscar_articulos" + + static let buscar_tipos = "buscar_tipos" + + static let obtener_articulo_barcode = "obtener_articulo_barcode" + + static let buscar_clientes = "buscar_clientes" + + static let obtener_vistas = "obtener_vistas" + + static let crear_order = "crear_order" + + static let split_order = "split_order" + + static let obtener_credito_riesgo = "obtener_credito_riesgo" + + static let obtener_datos_pasar_banco = "obtener_datos_pasar_banco" + + static let finalizar_transaccion = "finalizar_transaccion" + + static let obtener_articulos_comprados_ultima_semana = "obtener_articulos_comprados_ultima_semana" + + static let obtener_pedidos = "obtener_pedidos" + + static let get_version = "get_version" + + static let registrar_cliente_gcm = "registrar_cliente_gcm" + + static let enviar_notificacion = "enviar_notificacion" + + static let obtener_orders_activas_cliente = "obtener_orders_activas_cliente" + + static let borrar_order = "borrar_order" + + static let recuperar_pedido = "recuperar_pedido" + + static let verificar_agencia = "verificar_agencia" + + static let obtener_pedidos_realizados = "obtener_pedidos_realizados" + + static let imprimir_ticket = "imprimir_ticket" + + static let check_movimientos = "check_movimientos" +} diff --git a/Verdnaturaventas/Verdnaturaventas/Facade/FacadeVentas.swift b/Verdnaturaventas/Verdnaturaventas/Facade/FacadeVentas.swift new file mode 100644 index 0000000..4afa35d --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Facade/FacadeVentas.swift @@ -0,0 +1,137 @@ +// +// FacadeVentas.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class FacadeVentas: FacadeBase { + + static let instance = FacadeVentas() + + override init() { + super.init() + facadeName = "ventas" + facade = FacadeVentasClient.instance + } + + func ObtenerCliente(_ User: String, Pass: String) throws -> ClienteVentas + { + return try Execute(ParserClienteVentas(), command: Commands.obtener_cliente, args: User as AnyObject, Pass as AnyObject) as! ClienteVentas + } + + func ObtenerClienteById(_ id: NSNumber) throws -> ClienteVentas + { + return try Execute(ParserClienteVentas(), command: Commands.obtener_cliente_by_id, args: id) as! ClienteVentas + } + + func ObtenerVistas() throws -> Array + { + return try Execute(ParserVistas(), command: Commands.obtener_vistas) as! Array + } + + func ObtenerAgencias(_ fecha: String, consignatario: NSNumber) throws -> Array + { + return try Execute(ParserAgencias(), command: Commands.obtener_agencias, args: fecha as AnyObject, consignatario) as! Array + } + + func ObtenerPedidosPendientes(_ cliente: NSNumber) throws -> Array + { + return try Execute(ParserOrderResumen(), command: Commands.obtener_orders_activas_cliente, args: cliente) as! Array + } + + func BuscarTipos(_ cadena: String, agencia: NSNumber, consignatario: NSNumber, fecha: String, reino: NSNumber) throws -> Array + { + return try Execute(ParserTipo(), command: Commands.buscar_tipos, args: cadena as AnyObject, agencia, consignatario, fecha as AnyObject, reino) as! Array + } + + func ObtenerStock(_ fecha: String, consignatario: NSNumber, agencia: NSNumber, tipo: NSNumber, cadena: String?) throws -> Array + { + if(cadena == nil) + { + return try Execute(ParserArrayArticulos(), command: Commands.obtener_stock_tags, args: fecha as AnyObject, consignatario, agencia, tipo) as! Array + } + else{ + return try Execute(ParserArrayArticulos(), command: Commands.obtener_stock_tags, args: fecha as AnyObject, consignatario, agencia, tipo, cadena! as AnyObject) as! Array + } + } + + func ObtenerArticuloVenta(_ fecha: String, consignatario: NSNumber, agencia: NSNumber, tipo: NSNumber, itemId: NSNumber, warehouseId: NSNumber) throws -> ArticuloVentasTags + { + return try Execute(ParserArticulo(), command: Commands.obtener_articulo_ventas, args: fecha as AnyObject, consignatario, agencia, tipo, itemId, warehouseId) as! ArticuloVentasTags + } + + func CrearOrder(_ order: NSDictionary) throws -> Order + { + return try Execute(ParserOrder(), command: Commands.crear_order, args: order) as! Order + } + + func RecuperarOrder(_ orderResumen: NSDictionary) throws->Order + { + return try Execute(ParserOrder(), command: Commands.recuperar_pedido, args: orderResumen) as! Order + } + + func VerificarAgencia(_ consigna: NSNumber, agencia: NSNumber, fecha: String) throws -> Bool + { + return try Execute(ParserBool(), command: Commands.verificar_agencia, args: consigna, agencia, fecha as AnyObject) as! Bool + } + + + func RecalcularPrecios(_ o: NSDictionary) throws -> Order + { + return try Execute(ParserOrder(), command: Commands.recalcular_precios, args: o) as! Order + + } + + func BuscarClientes(_ cliente: String) throws -> Array + { + + return try Execute(ParserArrayClientes(), command: Commands.buscar_clientes, args: cliente as AnyObject) as! Array + + } + + func BuscarArticulos(_ cadena: String, f: String, consignatario: NSNumber, agencia: NSNumber) throws -> Array + { + return try Execute(ParserArrayArticulos(), command: Commands.buscar_articulos, args: cadena as AnyObject, f as AnyObject, consignatario, agencia) as! Array + } + + func ObtenerDatosPasarBanco(_ cantidad: NSNumber, fecha: String, cliente: NSNumber) throws -> DatosPasarBanco + { + let datos = try Execute(ParserDatosBanco(), command: Commands.obtener_datos_pasar_banco, args: cantidad, fecha as AnyObject, cliente) as! DatosPasarBanco + return datos + } + + func FinalizarTransaccion(_ status: String, Id: NSNumber) throws + { + _ = try Execute(ParserVoid(), command: Commands.finalizar_transaccion, args: status as AnyObject, Id) + } + + func ObtenerCreditoRiesgo(_ cliente: NSDictionary) throws -> ClienteVentas + { + return try Execute(ParserClienteVentas(), command: Commands.obtener_credito_riesgo, args: cliente) as! ClienteVentas + } + + func SplitOrder(_ order: NSDictionary) throws -> Order + { + return try Execute(ParserOrder(), command: Commands.split_order, args: order) as! Order + } + + func ModificarCliente(_ cliente: NSDictionary) throws + { + _ = try Execute(ParserVoid(), command: Commands.modificar_cliente, args: cliente) + } + + + func ObtenerPedidos(_ cliente: NSNumber) throws -> Array + { + return try Execute(ParserArrayTicketRecepcion(), command: Commands.obtener_pedidos, args: cliente) as! Array + } + + func CheckMovimientos(movimientos: Array>) throws { + _ = try Execute(ParserVoid(), command: Commands.check_movimientos, args: movimientos as AnyObject) + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Facade/FacadeVentasClient.swift b/Verdnaturaventas/Verdnaturaventas/Facade/FacadeVentasClient.swift new file mode 100644 index 0000000..0f21d8b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Facade/FacadeVentasClient.swift @@ -0,0 +1,96 @@ +// +// FacadeClient.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + + + +class FacadeVentasClient: FacadeClient, URLSessionDelegate { + + static let instance = FacadeVentasClient() + + let HOST = "https://app.verdnatura.es/" + //let HOST = "http://www.verdnatura.es/pruebas/" + //let HOST = "http://localhost:8080/" + + override func WriteResponseToStream(_ facade: String, command: String, argsMessage: String!, datos: inout AnyObject?) throws{ + + let url = HOST+facade+"/"+command + + let req = NSMutableURLRequest(url: URL(string: url)!) + print(ControllerPreferences.recuperarUsuario()) + req.httpMethod = POST + req.timeoutInterval = 10 + req.setValue(String(argsMessage!.characters.count), forHTTPHeaderField: "Content-Length") + req.httpBody = argsMessage!.data(using: String.Encoding.utf8) + req.addValue("json", forHTTPHeaderField: "Content-Type") + req.addValue(ControllerPreferences.recuperarUsuario(), forHTTPHeaderField: "user") + req.addValue(ControllerPreferences.recuperarPassword(), forHTTPHeaderField: "pass") + req.addValue("VENTAS", forHTTPHeaderField: "aplicacion") + req.addValue("1", forHTTPHeaderField: "version") + + let config = URLSessionConfiguration.default + let session = Foundation.URLSession(configuration:config, delegate: self, delegateQueue:nil) + + let (data, res, error) = session.synchronousDataTaskWithRequest(req as URLRequest) + + if(error == nil) + { + if(res!.statusCode == 555 || res!.statusCode == 200) + { + + if(res!.statusCode == 555) + { + throw ErrorFacade.errorServidor(String(data: data!, encoding: String.Encoding.utf8)!) + } + else + { + if self.tratarJson(data!) != nil + { + datos = self.tratarJson(data!)! + } + } + + } + else + { + throw ErrorFacade.errorServidor(String(data: data!, encoding: String.Encoding.utf8)!) + } + } + else{ + throw ErrorFacade.errorServidor(error!.description) + } + + } + + func URLSession(_ session: Foundation.URLSession, task: URLSessionTask, didReceiveChallenge challenge: URLAuthenticationChallenge, completionHandler: (Foundation.URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { + let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!) + completionHandler(Foundation.URLSession.AuthChallengeDisposition.useCredential, credential) + } + } +} + +extension URLSession { + func synchronousDataTaskWithRequest(_ url: URLRequest) -> (Data?, HTTPURLResponse?, NSError?) { + var data: Data?, response: URLResponse?, error: NSError? + + let semaphore = DispatchSemaphore(value: 0) + + dataTask(with: url, completionHandler: { + data = $0; response = $1; error = $2 as NSError? + semaphore.signal() + }).resume() + + _ = semaphore.wait(timeout: DispatchTime.distantFuture) + + return (data, response as? HTTPURLResponse, error) + } +} + diff --git a/Verdnaturaventas/Verdnaturaventas/Facade/SecurityFacade.swift b/Verdnaturaventas/Verdnaturaventas/Facade/SecurityFacade.swift new file mode 100644 index 0000000..a804568 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Facade/SecurityFacade.swift @@ -0,0 +1,32 @@ +// +// SecurityFacade.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class SecurityFacade: FacadeBase { + + static let instance = SecurityFacade() + + override init() { + super.init() + facadeName = "security" + facade = FacadeVentasClient.instance + } + + func Login(_ User: String, Pass: String) throws + { + _ = try Execute(ParserVoid(), command: Commands.login, args: User as AnyObject, Pass as AnyObject) + } + + func ModificarPassword(_ password: String, cid: NSNumber) throws + { + _ = try Execute(ParserVoid(), command: Commands.modificar_password, args: password as AnyObject, cid) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/OFL.txt b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/OFL.txt new file mode 100755 index 0000000..ae50f94 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2010, Matt McInerney (matt@pixelspread.com), +Copyright (c) 2011, Pablo Impallari (www.impallari.com|impallari@gmail.com), +Copyright (c) 2011, Rodrigo Fuenzalida (www.rfuenzalida.com|hello@rfuenzalida.com), with Reserved Font Name Raleway +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Bold.ttf b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Bold.ttf new file mode 100755 index 0000000..2ceaf63 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Bold.ttf differ diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-ExtraBold.ttf b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-ExtraBold.ttf new file mode 100755 index 0000000..308e5c1 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-ExtraBold.ttf differ diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-ExtraLight.ttf b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-ExtraLight.ttf new file mode 100755 index 0000000..281a001 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-ExtraLight.ttf differ diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Heavy.ttf b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Heavy.ttf new file mode 100755 index 0000000..8474318 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Heavy.ttf differ diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Light.ttf b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Light.ttf new file mode 100755 index 0000000..8b1d260 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Light.ttf differ diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Medium.ttf b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Medium.ttf new file mode 100755 index 0000000..127cdaa Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Medium.ttf differ diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Regular.ttf b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Regular.ttf new file mode 100755 index 0000000..252cad1 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Regular.ttf differ diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-SemiBold.ttf b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-SemiBold.ttf new file mode 100755 index 0000000..64b54a7 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-SemiBold.ttf differ diff --git a/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Thin.ttf b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Thin.ttf new file mode 100755 index 0000000..26d16e4 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Fonts/raleway/Raleway-Thin.ttf differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/120.png b/Verdnaturaventas/Verdnaturaventas/Images/120.png new file mode 100644 index 0000000..92c0f2b Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/120.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/180.png b/Verdnaturaventas/Verdnaturaventas/Images/180.png new file mode 100644 index 0000000..a813fb5 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/180.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/Login-01.jpg b/Verdnaturaventas/Verdnaturaventas/Images/Login-01.jpg new file mode 100644 index 0000000..716b3c5 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/Login-01.jpg differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/Login.png b/Verdnaturaventas/Verdnaturaventas/Images/Login.png new file mode 100644 index 0000000..e38f484 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/Login.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/Trash.png b/Verdnaturaventas/Verdnaturaventas/Images/Trash.png new file mode 100644 index 0000000..86d6693 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/Trash.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/artificial.png b/Verdnaturaventas/Verdnaturaventas/Images/artificial.png new file mode 100644 index 0000000..b338755 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/artificial.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/back22.png b/Verdnaturaventas/Verdnaturaventas/Images/back22.png new file mode 100644 index 0000000..09a4371 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/back22.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/back44.png b/Verdnaturaventas/Verdnaturaventas/Images/back44.png new file mode 100644 index 0000000..d07f800 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/back44.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/back66.png b/Verdnaturaventas/Verdnaturaventas/Images/back66.png new file mode 100644 index 0000000..5696a5d Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/back66.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/buscar25.png b/Verdnaturaventas/Verdnaturaventas/Images/buscar25.png new file mode 100644 index 0000000..a2cf0a6 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/buscar25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/buscar50.png b/Verdnaturaventas/Verdnaturaventas/Images/buscar50.png new file mode 100644 index 0000000..736358c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/buscar50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/buscar75.png b/Verdnaturaventas/Verdnaturaventas/Images/buscar75.png new file mode 100644 index 0000000..5f3b020 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/buscar75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/buscar_fill25.png b/Verdnaturaventas/Verdnaturaventas/Images/buscar_fill25.png new file mode 100644 index 0000000..c2607f5 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/buscar_fill25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/buscar_fill50.png b/Verdnaturaventas/Verdnaturaventas/Images/buscar_fill50.png new file mode 100644 index 0000000..3c649c7 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/buscar_fill50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/buscar_fill75.png b/Verdnaturaventas/Verdnaturaventas/Images/buscar_fill75.png new file mode 100644 index 0000000..26a6da7 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/buscar_fill75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/cancel1.png b/Verdnaturaventas/Verdnaturaventas/Images/cancel1.png new file mode 100644 index 0000000..222a9aa Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/cancel1.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/carrito.png b/Verdnaturaventas/Verdnaturaventas/Images/carrito.png new file mode 100644 index 0000000..4e747f9 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/carrito.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/carrito25.png b/Verdnaturaventas/Verdnaturaventas/Images/carrito25.png new file mode 100644 index 0000000..5fd25e2 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/carrito25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/carrito50.png b/Verdnaturaventas/Verdnaturaventas/Images/carrito50.png new file mode 100644 index 0000000..78b6bf8 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/carrito50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/carrito75.png b/Verdnaturaventas/Verdnaturaventas/Images/carrito75.png new file mode 100644 index 0000000..6fe4030 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/carrito75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/carrito_fill25.png b/Verdnaturaventas/Verdnaturaventas/Images/carrito_fill25.png new file mode 100644 index 0000000..a44bb7a Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/carrito_fill25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/carrito_fill50.png b/Verdnaturaventas/Verdnaturaventas/Images/carrito_fill50.png new file mode 100644 index 0000000..030f07c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/carrito_fill50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/carrito_fill75.png b/Verdnaturaventas/Verdnaturaventas/Images/carrito_fill75.png new file mode 100644 index 0000000..5fa4dc6 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/carrito_fill75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/complemento.png b/Verdnaturaventas/Verdnaturaventas/Images/complemento.png new file mode 100644 index 0000000..b48d7e0 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/complemento.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/confeccion.png b/Verdnaturaventas/Verdnaturaventas/Images/confeccion.png new file mode 100644 index 0000000..605decc Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/confeccion.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/disclouser.png b/Verdnaturaventas/Verdnaturaventas/Images/disclouser.png new file mode 100644 index 0000000..d2b1f5c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/disclouser.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/envios25.png b/Verdnaturaventas/Verdnaturaventas/Images/envios25.png new file mode 100644 index 0000000..76639d1 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/envios25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/envios50.png b/Verdnaturaventas/Verdnaturaventas/Images/envios50.png new file mode 100644 index 0000000..0590790 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/envios50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/envios75.png b/Verdnaturaventas/Verdnaturaventas/Images/envios75.png new file mode 100644 index 0000000..e42b0b7 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/envios75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/flor.png b/Verdnaturaventas/Verdnaturaventas/Images/flor.png new file mode 100644 index 0000000..6e20147 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/flor.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/inicio25.png b/Verdnaturaventas/Verdnaturaventas/Images/inicio25.png new file mode 100644 index 0000000..5c3e739 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/inicio25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/inicio50.png b/Verdnaturaventas/Verdnaturaventas/Images/inicio50.png new file mode 100644 index 0000000..119956c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/inicio50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/inicio75.png b/Verdnaturaventas/Verdnaturaventas/Images/inicio75.png new file mode 100644 index 0000000..7ca578e Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/inicio75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/inicio_fill25.png b/Verdnaturaventas/Verdnaturaventas/Images/inicio_fill25.png new file mode 100644 index 0000000..3872e5d Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/inicio_fill25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/inicio_fill50.png b/Verdnaturaventas/Verdnaturaventas/Images/inicio_fill50.png new file mode 100644 index 0000000..e354a66 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/inicio_fill50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/inicio_fill75.png b/Verdnaturaventas/Verdnaturaventas/Images/inicio_fill75.png new file mode 100644 index 0000000..48bf19c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/inicio_fill75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/micuenta25.png b/Verdnaturaventas/Verdnaturaventas/Images/micuenta25.png new file mode 100644 index 0000000..f5b2795 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/micuenta25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/micuenta50.png b/Verdnaturaventas/Verdnaturaventas/Images/micuenta50.png new file mode 100644 index 0000000..1f7ffde Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/micuenta50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/micuenta75.png b/Verdnaturaventas/Verdnaturaventas/Images/micuenta75.png new file mode 100644 index 0000000..3ac66bc Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/micuenta75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/micuenta_fill25.png b/Verdnaturaventas/Verdnaturaventas/Images/micuenta_fill25.png new file mode 100644 index 0000000..36dba02 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/micuenta_fill25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/micuenta_fill50.png b/Verdnaturaventas/Verdnaturaventas/Images/micuenta_fill50.png new file mode 100644 index 0000000..7690338 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/micuenta_fill50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/micuenta_fill75.png b/Verdnaturaventas/Verdnaturaventas/Images/micuenta_fill75.png new file mode 100644 index 0000000..1f9aeb7 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/micuenta_fill75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/mispagos25.png b/Verdnaturaventas/Verdnaturaventas/Images/mispagos25.png new file mode 100644 index 0000000..7003db8 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/mispagos25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/mispagos50.png b/Verdnaturaventas/Verdnaturaventas/Images/mispagos50.png new file mode 100644 index 0000000..f50fa03 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/mispagos50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/mispagos75.png b/Verdnaturaventas/Verdnaturaventas/Images/mispagos75.png new file mode 100644 index 0000000..7c00122 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/mispagos75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/noimagen-01.png b/Verdnaturaventas/Verdnaturaventas/Images/noimagen-01.png new file mode 100644 index 0000000..fb4dda8 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/noimagen-01.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/oculto25.png b/Verdnaturaventas/Verdnaturaventas/Images/oculto25.png new file mode 100644 index 0000000..a13a70d Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/oculto25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/oculto50.png b/Verdnaturaventas/Verdnaturaventas/Images/oculto50.png new file mode 100644 index 0000000..c0b608f Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/oculto50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/oculto75.png b/Verdnaturaventas/Verdnaturaventas/Images/oculto75.png new file mode 100644 index 0000000..284102f Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/oculto75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/planta.png b/Verdnaturaventas/Verdnaturaventas/Images/planta.png new file mode 100644 index 0000000..e9ae4a4 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/planta.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/salir25.png b/Verdnaturaventas/Verdnaturaventas/Images/salir25.png new file mode 100644 index 0000000..5ff9ab8 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/salir25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/salir50.png b/Verdnaturaventas/Verdnaturaventas/Images/salir50.png new file mode 100644 index 0000000..6abc881 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/salir50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/salir75.png b/Verdnaturaventas/Verdnaturaventas/Images/salir75.png new file mode 100644 index 0000000..9448841 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/salir75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/ticB25.png b/Verdnaturaventas/Verdnaturaventas/Images/ticB25.png new file mode 100644 index 0000000..5babb0c Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/ticB25.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/ticB50.png b/Verdnaturaventas/Verdnaturaventas/Images/ticB50.png new file mode 100644 index 0000000..cefdafa Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/ticB50.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/ticB75.png b/Verdnaturaventas/Verdnaturaventas/Images/ticB75.png new file mode 100644 index 0000000..cc6f157 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/ticB75.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Images/verde.png b/Verdnaturaventas/Verdnaturaventas/Images/verde.png new file mode 100644 index 0000000..983aafa Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Images/verde.png differ diff --git a/Verdnaturaventas/Verdnaturaventas/Info.plist b/Verdnaturaventas/Verdnaturaventas/Info.plist new file mode 100644 index 0000000..0d7c8aa --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Info.plist @@ -0,0 +1,67 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + Verdnatura + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLocalizations + + Catalan + Portugues + en + Spanish + + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0.4 + CFBundleSignature + ???? + CFBundleVersion + 6 + LSApplicationCategoryType + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UIAppFonts + + Raleway + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/Verdnaturaventas/Verdnaturaventas/LaunchScreen.storyboard b/Verdnaturaventas/Verdnaturaventas/LaunchScreen.storyboard new file mode 100644 index 0000000..58eb6f6 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/LaunchScreen.storyboard @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Main.storyboard b/Verdnaturaventas/Verdnaturaventas/Main.storyboard new file mode 100644 index 0000000..c8d5aea --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Main.storyboard @@ -0,0 +1,2514 @@ + + + + + + + + + + + + + + + + Raleway + + + Raleway-SemiBold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Model/Agencia.swift b/Verdnaturaventas/Verdnaturaventas/Model/Agencia.swift new file mode 100644 index 0000000..0988cb1 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/Agencia.swift @@ -0,0 +1,27 @@ +// +// Agencia.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 14/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class Agencia: ModelBase{ + + var Id_Agencia: NSNumber? = 0 + var Agencia: String? = "" + var Vista: NSNumber? = 0 + + func toJson() -> Dictionary + { + var json = Dictionary() + json["Id_Agencia"] = Id_Agencia! + json["Agencia"] = Agencia! as AnyObject? + json["Vista"] = Vista! + return json + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/ArticuloVentas.swift b/Verdnaturaventas/Verdnaturaventas/Model/ArticuloVentas.swift new file mode 100644 index 0000000..be4754f --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/ArticuloVentas.swift @@ -0,0 +1,67 @@ +// +// ArticuloVentas.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 14/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ArticuloVentasTags: ModelBase { + + var Id_Article: NSNumber? = 0 + var Article: String? = "" + var foto: String? = "" + var Id_Tipo: NSNumber? = 0 + var Tipo: String? = "" + var available: NSNumber? = 0.0 + var price: NSNumber? = 0.0 + var vcalc: NSNumber? = 0 + var Reino: NSNumber? = 0 + var Unidades: NSNumber? = 0 + var ReinoNombre: String? = "" + var warehouse_id: NSNumber? = 0 + var tags: Dictionary = Dictionary() + var ArticulosSimilares: Array? = [] + var ArticulosComprados: Array? = [] + var tarifas: Array? = [] + + func toJson() -> Dictionary + { + var json = Dictionary() + json["Id_Article"] = Id_Article! + json["Article"] = Article! as AnyObject? + json["foto"] = foto! as AnyObject? + json["Id_Tipo"] = Id_Tipo! + json["Tipo"] = Tipo! as AnyObject? + json["available"] = available! + json["price"] = price! + json["vcalc"] = vcalc! + json["Reino"] = Reino! + json["Unidades"] = Unidades! + json["ReinoNombre"] = ReinoNombre! as AnyObject? + json["warehouse_id"] = warehouse_id! + var arrAS = Array>() + for a in ArticulosSimilares!{ + arrAS.append(a.toJson()) + } + json["ArticulosSimilares"] = arrAS as AnyObject? + var arrAC = Array>() + for a in ArticulosComprados!{ + arrAC.append(a.toJson()) + } + json["ArticulosComprados"] = arrAC as AnyObject? + var arrTarifas = Array>() + for t in tarifas!{ + arrTarifas.append(t.toJson()) + } + + json["tarifas"] = arrTarifas as AnyObject? + + return json + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/ClienteVentas.swift b/Verdnaturaventas/Verdnaturaventas/Model/ClienteVentas.swift new file mode 100644 index 0000000..98c93d8 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/ClienteVentas.swift @@ -0,0 +1,47 @@ +// +// ClienteVentas.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + + +class ClienteVentas: ModelBase { + + var Id_Cliente: NSNumber? = 0 + var Cliente: String? = "" + var Domicilio: String? = "" + var Email: String? = "" + var Mail: NSNumber? = 0 + var Name: String? = "" + var Consignatarios: Array? = [] + var Ultimos_Tickets: Array? = [] + var modificado: Bool? = false + var Tipo: String? = "" + var Credito: NSNumber? + var Riesgo: NSNumber? + + func toJson() -> Dictionary + { + var json = Dictionary() + json["Id_Cliente"] = Id_Cliente! + json["Cliente"] = Cliente! as AnyObject? + json["Domicilio"] = Domicilio! as AnyObject? + json["Email"] = Email! as AnyObject? + json["Name"] = Name! as AnyObject? + //json["Consignatarios"] = Consignatarios + //json["Ultimos_Tickets"] = Ultimos_Tickets + json["modificado"] = modificado! as AnyObject? + json["Tipo"] = Tipo! as AnyObject? + json["Credito"] = Credito! + json["Riesgo"] = Riesgo! + + return json + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/Component.swift b/Verdnaturaventas/Verdnaturaventas/Model/Component.swift new file mode 100644 index 0000000..be3cc1a --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/Component.swift @@ -0,0 +1,30 @@ +// +// Component.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 14/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class Component: ModelBase { + + var id: NSNumber? + var component_id: NSNumber? + var cost: NSNumber? + var warehouse_id: NSNumber? = 0 + + func toJson() -> Dictionary + { + var json = Dictionary() + json["id"] = id! + json["component_id"] = component_id! + json["cost"] = cost! + json["warehouse_id"] = warehouse_id! + + return json + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/Consignatario.swift b/Verdnaturaventas/Verdnaturaventas/Model/Consignatario.swift new file mode 100644 index 0000000..961b64a --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/Consignatario.swift @@ -0,0 +1,35 @@ +// +// Consignatario.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class Consignatario: ModelBase { + + var Id_Consigna: NSNumber? = 0 + var Consignatario: String? = "" + var Seguro: NSNumber? = 0 + var Id_Agencia: NSNumber? = 0 + var predeterminada: NSNumber? = 0 + var Domicilio: String? = "" + + + func toJson() -> Dictionary + { + var json = Dictionary() + json["Id_Consigna"] = Id_Consigna! + json["Consignatario"] = Consignatario! as AnyObject? + json["Seguro"] = Seguro! + json["Id_Agencia"] = Id_Agencia! + json["predeterminada"] = predeterminada! + json["Domicilio"] = Domicilio! as AnyObject? + + return json + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/DatosCompra.swift b/Verdnaturaventas/Verdnaturaventas/Model/DatosCompra.swift new file mode 100644 index 0000000..afde80f --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/DatosCompra.swift @@ -0,0 +1,23 @@ +// +// DatosCompra.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 10/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class DatosCompra: ModelBase { + + var Cantidad: NSNumber? + var Especificaciones: String? = "" + var tarifa: Tarifa? + var articulo: ArticuloVentasTags? + var Precio: NSNumber? + var grouping: NSNumber? + var items: NSNumber? + var Components: Array? + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/DatosPasarBanco.swift b/Verdnaturaventas/Verdnaturaventas/Model/DatosPasarBanco.swift new file mode 100644 index 0000000..100febf --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/DatosPasarBanco.swift @@ -0,0 +1,19 @@ +// +// DatosPasarBanco.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 23/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class DatosPasarBanco: ModelBase { + + var Url: String? = "" + var EncodedParams: String? = "" + var DSSignature: String? = "" + var DSOrder: String? = "" + var Signature: String? = "" +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/Order.swift b/Verdnaturaventas/Verdnaturaventas/Model/Order.swift new file mode 100644 index 0000000..9239bcd --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/Order.swift @@ -0,0 +1,69 @@ +// +// Order.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 14/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class Order: ModelBase { + + var id: NSNumber? = 0 + var customer_id: NSNumber? = 0 + var delivery_method_id: NSNumber? = 0 + var agency_id: NSNumber? = 0 + var address_id: NSNumber? = 0 + var Fecha: String? = "" + var FechaAntigua: String? = nil + var consignatarioActivo: Consignatario? = nil + var agencia: Agencia?, agenciaAntigua: Agencia? = nil + var rows: Array? = [] + var rowsOld: Array? = [] + var cliente: ClienteVentas? = nil + var TotalConIva: NSNumber? = 0.0 + var PedidoSplitado: Bool? = false + var CantidadPagar: NSNumber? = 0.0 + var createYear: NSNumber? = 0, createMonth: NSNumber? = 0, createDay: NSNumber? = 0 + var transactionOk: String? = nil + var Notas: String? = "" + var source_app: String? = "IOS" + var recuperado: Bool? = false + + + func toJson() -> Dictionary + { + var json = Dictionary() + json["id"] = id! + json["customer_id"] = customer_id! + json["delivery_method_id"] = delivery_method_id! + json["agency_id"] = agency_id! + json["address_id"] = address_id! + json["Fecha"] = Fecha! as AnyObject? + json["consignatarioActivo"] = consignatarioActivo?.toJson() as AnyObject?? ?? nil + json["agencia"] = agencia?.toJson() as AnyObject?? ?? nil + json["agenciaAntigua"] = agencia?.toJson() as AnyObject?? ?? nil + var arrRows: Array> = [] + for row in rows! + { + let r = row.toJson() + arrRows.append(r) + } + json["rows"] = arrRows as AnyObject? + json["cliente"] = cliente?.toJson() as AnyObject?? ?? nil + json["TotalConIva"] = TotalConIva! + json["PedidoSplitado"] = PedidoSplitado! as AnyObject? + json["CantidadPagar"] = CantidadPagar! + json["createYear"] = createYear! + json["createMonth"] = createMonth! + json["createDay"] = createDay! + json["Notas"] = Notas! as AnyObject? + json["source_app"] = source_app! as AnyObject? + json["recuperado"] = recuperado! as AnyObject? + + return json + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/OrderDiference.swift b/Verdnaturaventas/Verdnaturaventas/Model/OrderDiference.swift new file mode 100644 index 0000000..0c9bb0f --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/OrderDiference.swift @@ -0,0 +1,19 @@ +// +// OrderDiference.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 17/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class OrderDiference: ModelBase { + + var articulo: String? = "" + var oldPrice: NSNumber?, price: NSNumber? + var oldCantidad: NSNumber?, cantidad: NSNumber? + var escribirPrecio: Bool? = false, escribirDisponible: Bool? = false + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/OrderResumen.swift b/Verdnaturaventas/Verdnaturaventas/Model/OrderResumen.swift new file mode 100644 index 0000000..666ba21 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/OrderResumen.swift @@ -0,0 +1,37 @@ +// +// OrderResumen.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 21/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class OrderResumen: ModelBase { + + var id: NSNumber? = 0 + var customer_id: NSNumber? = 0 + var delivery_method_id: NSNumber? = 0 + var agency_id: NSNumber? = 0 + var agency: String? = "" + var address_id: NSNumber? = 0 + var address: String? = "" + var Fecha: String? = "" + + func toJson() -> Dictionary + { + var json = Dictionary() + json["id"] = id! + json["customer_id"] = customer_id! + json["delivery_method_id"] = delivery_method_id! + json["agency_id"] = agency_id! + json["agency"] = agency! as AnyObject? + json["address_id"] = address_id! + json["address"] = address! as AnyObject? + json["Fecha"] = Fecha! as AnyObject? + return json + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/OrderRow.swift b/Verdnaturaventas/Verdnaturaventas/Model/OrderRow.swift new file mode 100644 index 0000000..a075d59 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/OrderRow.swift @@ -0,0 +1,33 @@ +// +// OrderRow.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 14/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class OrderRow: ModelBase{ + + var id: NSNumber? = 0 + var order_id: NSNumber? = 0 + var amount: NSNumber? = 0 + var amount_old: NSNumber? = 0 + var tarifa: Tarifa? = nil + var articulo: ArticuloVentasTags? = nil + + func toJson() -> Dictionary + { + var json = Dictionary() + json["id"] = id! + json["order_id"] = order_id! + json["amount"] = amount! + json["tarifa"] = tarifa?.toJson() as AnyObject?? ?? nil + json["articulo"] = articulo?.toJson() as AnyObject?? ?? nil + + return json + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/ParametrosReino.swift b/Verdnaturaventas/Verdnaturaventas/Model/ParametrosReino.swift new file mode 100644 index 0000000..019421a --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/ParametrosReino.swift @@ -0,0 +1,17 @@ +// +// ParametrosReino.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 27/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParametrosReino: ModelBase { + + var reino: NSNumber?, consignatario: NSNumber?, agencia: NSNumber? + var fecha: String?, nombre: String?, cadena: String? + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/Tarifa.swift b/Verdnaturaventas/Verdnaturaventas/Model/Tarifa.swift new file mode 100644 index 0000000..4e3bd26 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/Tarifa.swift @@ -0,0 +1,41 @@ +// +// Tarifa.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 14/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class Tarifa: ModelBase { + + var Id_Article: NSNumber? + var rate: NSNumber? + var grouping: NSNumber? + var warehouse_id: NSNumber? + var warehouse: String? + var items: NSNumber? + var price: NSNumber? + var Components: Array? = [] + + func toJson() -> Dictionary + { + var json = Dictionary() + json["Id_Article"] = Id_Article! + json["rate"] = rate! + json["grouping"] = grouping! + json["warehouse_id"] = warehouse_id! + json["warehouse"] = warehouse! as AnyObject? + json["price"] = price! + var arrComp: Array> = [] + for comp in Components!{ + arrComp.append(comp.toJson()) + } + json["Components"] = arrComp as AnyObject? + + return json + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/TicketRecepcion.swift b/Verdnaturaventas/Verdnaturaventas/Model/TicketRecepcion.swift new file mode 100644 index 0000000..7f43cea --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/TicketRecepcion.swift @@ -0,0 +1,20 @@ +// +// TicketRecepcion.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class TicketRecepcion: ModelBase { + + var Id_Ticket: NSNumber? = 0 + var Fecha: String? = "" + var Agencia: String? = "" + var Total: NSNumber? = 0 + var Lineas: Array = [] + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/TicketRecepcionLinea.swift b/Verdnaturaventas/Verdnaturaventas/Model/TicketRecepcionLinea.swift new file mode 100644 index 0000000..11ced0b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/TicketRecepcionLinea.swift @@ -0,0 +1,41 @@ +// +// TicketRecepcionLineas.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class TicketRecepcionLinea: ModelBase { + + var Id_Movimiento: NSNumber? = 0 + var Concepte: String? = "" + var Cantidad: NSNumber? = 0 + var Medida: NSNumber? = 0 + var Color: String? = "" + var Foto: String? = "" + var Preu: NSNumber? = 0.0 + var Ok: Bool? = false + var FechaContar: String? = "" + + func toJson() -> Dictionary + { + var json = Dictionary() + json["Id_Movimiento"] = Id_Movimiento! + json["Concepte"] = Concepte! as AnyObject? + json["Cantidad"] = Cantidad! + json["Medida"] = Medida! + json["Color"] = Color! as AnyObject? + json["Foto"] = Foto! as AnyObject? + json["Preu"] = Preu! + json["Ok"] = Ok! as AnyObject? + json["FechaContar"] = FechaContar! as AnyObject? + + return json + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/Tipo.swift b/Verdnaturaventas/Verdnaturaventas/Model/Tipo.swift new file mode 100644 index 0000000..4c25171 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/Tipo.swift @@ -0,0 +1,30 @@ +// +// Tipo.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 27/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class Tipo: ModelBase { + + var Tipo_Id: NSNumber? = 0 + var Tipo: String? = "" + var Reino_id: NSNumber? = 0 + var ReinoNombre: String? = "" + + func toJson() -> Dictionary + { + var json = Dictionary() + json["Tipo_Id"] = Tipo_Id! + json["Tipo"] = Tipo! as AnyObject? + json["Reino_id"] = Reino_id! + json["ReinoNombre"] = ReinoNombre! as AnyObject? + + return json + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Model/Vista.swift b/Verdnaturaventas/Verdnaturaventas/Model/Vista.swift new file mode 100644 index 0000000..9f316b7 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Model/Vista.swift @@ -0,0 +1,27 @@ +// +// Vista.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class Vista: ModelBase { + + var vista_id: NSNumber? = 0 + var vista: String? = "" + var code: String? = "" + + func toJson() -> Dictionary + { + var json = Dictionary() + json["vista_id"] = vista_id! + json["vista"] = vista! as AnyObject? + json["code"] = code! as AnyObject? + return json + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserAgencias.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserAgencias.swift new file mode 100644 index 0000000..678f3d1 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserAgencias.swift @@ -0,0 +1,35 @@ +// +// ParserAgencias.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 19/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserAgencias: Parser { + + typealias T = Array + + func parse(_ jsonObject: AnyObject) -> Array { + + let array = jsonObject as! NSArray + + var agencias: Array = [] + + for a in array{ + agencias.append(parseAgencia(a as! NSDictionary)) + } + + return agencias + } + + func parseAgencia(_ jsonDictionary: NSDictionary) -> Agencia{ + let agencia = Agencia() + agencia.parseJson(jsonDictionary) + return agencia + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserArrayArticulos.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserArrayArticulos.swift new file mode 100644 index 0000000..ad5364b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserArrayArticulos.swift @@ -0,0 +1,32 @@ +// +// ParserArrayArticulos.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 28/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserArrayArticulos: Parser { + + typealias T = Array + + func parse(_ jsonObject: AnyObject) -> Array { + + let array = jsonObject as! NSArray + var articulos: Array = [] + let parserArticulo = ParserArticulo() + + + for a in array{ + articulos.append(parserArticulo.parse(a as AnyObject)) + } + + + return articulos + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserArrayClientes.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserArrayClientes.swift new file mode 100644 index 0000000..684ba11 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserArrayClientes.swift @@ -0,0 +1,30 @@ +// +// ParserArrayClientes.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserArrayClientes: Parser { + typealias T = Array + + func parse(_ jsonObject: AnyObject) -> Array { + + let array = jsonObject as! NSArray + var clientes: Array = [] + let parserCliente = ParserClienteVentas() + + + for c in array{ + clientes.append(parserCliente.parse(c as AnyObject)) + } + + + return clientes + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserArrayTicketRecepcion.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserArrayTicketRecepcion.swift new file mode 100644 index 0000000..f43a8cc --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserArrayTicketRecepcion.swift @@ -0,0 +1,33 @@ +// +// ParserArrayTicketRecepcion.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserArrayTicketRecepcion: Parser { + + typealias T = Array + + func parse(_ jsonObject: AnyObject) -> Array { + + let array = jsonObject as! NSArray + var tickets = Array() + + for t in array + { + var ticket = TicketRecepcion() + ticket = ParserTicketRecepcion().parse(t as AnyObject) + tickets.append(ticket) + } + + + return tickets + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserArticulo.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserArticulo.swift new file mode 100644 index 0000000..77e31e7 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserArticulo.swift @@ -0,0 +1,50 @@ +// +// ParserArticulo.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 28/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserArticulo: Parser { + + typealias T = ArticuloVentasTags + + func parse(_ jsonObject: AnyObject) -> ArticuloVentasTags { + + let dictionary = jsonObject as! NSDictionary + let articulo = parseArticulo(dictionary) + + if let articulosSimilares = dictionary["ArticulosSimilares"] + { + for a in articulosSimilares as! NSArray{ + articulo.ArticulosSimilares!.append(parseArticulo(a as! NSDictionary)) + } + } + + if let articulosComprados = dictionary["ArticulosComprados"] + { + for a in articulosComprados as! NSArray{ + articulo.ArticulosComprados!.append(parseArticulo(a as! NSDictionary)) + } + } + return articulo + } + + func parseArticulo(_ jsonDictionary: NSDictionary) -> ArticuloVentasTags + { + let articulo = ArticuloVentasTags() + + articulo.parseJson(jsonDictionary) + articulo.tarifas = ParserTarifa().parse(jsonDictionary["tarifas"] as! NSArray) + //articulo.tags = jsonDictionary["tags"] as! Dictionary + + return articulo + + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserClienteVentas.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserClienteVentas.swift new file mode 100644 index 0000000..6054e60 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserClienteVentas.swift @@ -0,0 +1,43 @@ +// +// ParserClient.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserClienteVentas: Parser { + + typealias T = ClienteVentas + + func parse(_ jsonObject: AnyObject) -> ClienteVentas { + + let jsonDictionary = jsonObject as! NSDictionary + + let cliente = ClienteVentas() + + cliente.parseJson(jsonDictionary) + + if let ultimosTickets = jsonDictionary["Ultimos_Tickets"] + { + for ticket in ultimosTickets as! NSArray{ + cliente.Ultimos_Tickets?.append(ticket as! String) + } + } + let pc = ParserConsignatario() + if let consignatarios = jsonDictionary["Consignatarios"] + { + for con in consignatarios as! NSArray{ + let consignatario = pc.parse(con as! NSDictionary) + cliente.Consignatarios?.append(consignatario) + } + } + + return cliente + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserConsignatario.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserConsignatario.swift new file mode 100644 index 0000000..98571ae --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserConsignatario.swift @@ -0,0 +1,28 @@ +// +// ParserConsignatarios.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserConsignatario: Parser { + + typealias T = Consignatario + + func parse(_ jsonObject: AnyObject) -> Consignatario { + + let jsonDictionary = jsonObject as! NSDictionary + + let consignatario = Consignatario() + + consignatario.parseJson(jsonDictionary) + + return consignatario + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserDatosBanco.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserDatosBanco.swift new file mode 100644 index 0000000..fe3c067 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserDatosBanco.swift @@ -0,0 +1,25 @@ +// +// ParserDatosBanco.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 23/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserDatosBanco: Parser { + + typealias T = DatosPasarBanco + + func parse(_ jsonObject: AnyObject) -> DatosPasarBanco { + + let jsonDictionary = jsonObject as! NSDictionary + + let datos = DatosPasarBanco() + datos.parseJson(jsonDictionary) + return datos + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserOrder.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserOrder.swift new file mode 100644 index 0000000..1ae37b4 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserOrder.swift @@ -0,0 +1,39 @@ +// +// ParserOrder.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 11/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserOrder: Parser { + + typealias T = Order + + func parse(_ jsonObject: AnyObject) -> Order { + + let jsonDictionary = jsonObject as! NSDictionary + + let order = Order() + order.parseJson(jsonDictionary) + order.consignatarioActivo = ParserConsignatario().parse(jsonDictionary["consignatarioActivo"]! as AnyObject) + order.agencia = ParserAgencias().parseAgencia(jsonDictionary["agencia"] as! NSDictionary) + order.PedidoSplitado = (jsonDictionary["PedidoSplitado"] as AnyObject).boolValue + if let cliente = jsonDictionary["cliente"] + { + order.cliente = ParserClienteVentas().parse(cliente as AnyObject) + } + if let rows = jsonDictionary["rows"] + { + for r in rows as! NSArray{ + order.rows?.append(ParserOrderRow().parse(r as AnyObject)) + } + } + return order + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserOrderResumen.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserOrderResumen.swift new file mode 100644 index 0000000..5de90a2 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserOrderResumen.swift @@ -0,0 +1,36 @@ +// +// ParserOrderResumen.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 21/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserOrderResumen: Parser { + + typealias T = Array + + func parse(_ jsonObject: AnyObject) -> Array { + + let array = jsonObject as! NSArray + + var orders: Array = [] + + for o in array{ + orders.append(parseOrder(o as! NSDictionary)) + } + + return orders + } + + func parseOrder(_ jsonDictionary: NSDictionary) -> OrderResumen{ + let order = OrderResumen() + order.parseJson(jsonDictionary) + return order + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserOrderRow.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserOrderRow.swift new file mode 100644 index 0000000..5b392c3 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserOrderRow.swift @@ -0,0 +1,29 @@ +// +// ParserOrderRow.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 11/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserOrderRow: Parser { + + typealias T = OrderRow + + func parse(_ jsonObject: AnyObject) -> OrderRow { + + let jsonDictionary = jsonObject as! NSDictionary + + let row = OrderRow() + row.parseJson(jsonDictionary) + row.tarifa = ParserTarifa().parserTarifa(jsonDictionary["tarifa"] as! NSDictionary) + row.articulo = ParserArticulo().parse(jsonDictionary["articulo"]! as AnyObject) + + return row + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserTarifa.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserTarifa.swift new file mode 100644 index 0000000..45eb887 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserTarifa.swift @@ -0,0 +1,52 @@ +// +// ParserTarifa.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 28/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserTarifa: Parser { + + typealias T = Array + + func parse(_ jsonObject: AnyObject) -> Array { + + var tarifas: Array = [] + + for t in jsonObject as! NSArray{ + tarifas.append(parserTarifa(t as! NSDictionary)) + } + + return tarifas + } + + func parserTarifa(_ jsonDictionary: NSDictionary) -> Tarifa + { + let tarifa = Tarifa() + + tarifa.parseJson(jsonDictionary) + + if let components = jsonDictionary["Components"] + { + for c in components as! NSArray + { + tarifa.Components!.append(parserComponent(c as! NSDictionary)) + } + } + return tarifa + } + + func parserComponent(_ jsonDictionary: NSDictionary) -> Component + { + let component = Component() + + component.parseJson(jsonDictionary) + + return component + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserTicketRecepcion.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserTicketRecepcion.swift new file mode 100644 index 0000000..948ef83 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserTicketRecepcion.swift @@ -0,0 +1,33 @@ +// +// ParserTicketRecepcion.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserTicketRecepcion: Parser { + + typealias T = TicketRecepcion + + func parse(_ jsonObject: AnyObject) -> TicketRecepcion { + + let jsonDictionary = jsonObject as! NSDictionary + + let ticket = TicketRecepcion() + ticket.parseJson(jsonDictionary) + + for tl in jsonDictionary["Lineas"] as! NSArray + { + let parserLinea = ParserTicketRecepcionLinea() + let linea = parserLinea.parse(tl as AnyObject) + ticket.Lineas.append(linea) + } + + return ticket + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserTicketRecepcionLinea.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserTicketRecepcionLinea.swift new file mode 100644 index 0000000..c673537 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserTicketRecepcionLinea.swift @@ -0,0 +1,28 @@ +// +// ParserTicketRecepcionLinea.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 30/3/17. +// Copyright © 2017 Nelo Sanchez Gomiz. All rights reserved. +// + +import Foundation +import BaseLibrary + +class ParserTicketRecepcionLinea: Parser { + + typealias T = TicketRecepcionLinea + + func parse(_ jsonObject: AnyObject) -> TicketRecepcionLinea { + + let jsonDictionary = jsonObject as! NSDictionary + + let linea = TicketRecepcionLinea() + linea.parseJson(jsonDictionary) + if let Ok = (jsonDictionary["Ok"] as AnyObject).boolValue{ + linea.Ok = Ok + } + return linea + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserTipo.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserTipo.swift new file mode 100644 index 0000000..bae3d16 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserTipo.swift @@ -0,0 +1,38 @@ +// +// ParserTipo.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 27/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserTipo: Parser { + + typealias T = Array + + func parse(_ jsonObject: AnyObject) -> Array { + + let array = jsonObject as! NSArray + + var tipos: Array = [] + + for o in array{ + tipos.append(parserTipo(o as! NSDictionary)) + } + + return tipos + } + + func parserTipo(_ jsonDictionary: NSDictionary) -> Tipo{ + let tipo = Tipo() + + tipo.parseJson(jsonDictionary) + + return tipo + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Parser/ParserVistas.swift b/Verdnaturaventas/Verdnaturaventas/Parser/ParserVistas.swift new file mode 100644 index 0000000..40487f8 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Parser/ParserVistas.swift @@ -0,0 +1,31 @@ +// +// ParserVista.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ParserVistas: Parser { + + typealias T = Array + + func parse(_ jsonObject: AnyObject) -> Array { + + let array = jsonObject as! NSArray + + var vistas: Array = [] + + for v in array{ + let vista = Vista() + vista.parseJson(v as! NSDictionary) + vistas.append(vista) + } + + return vistas + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Pruebas.playground/Contents.swift b/Verdnaturaventas/Verdnaturaventas/Pruebas.playground/Contents.swift new file mode 100644 index 0000000..f3f4e90 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Pruebas.playground/Contents.swift @@ -0,0 +1,3 @@ +//: Playground - noun: a place where people can play + + diff --git a/Verdnaturaventas/Verdnaturaventas/Pruebas.playground/contents.xcplayground b/Verdnaturaventas/Verdnaturaventas/Pruebas.playground/contents.xcplayground new file mode 100644 index 0000000..5da2641 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Pruebas.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Verdnaturaventas/Verdnaturaventas/Pruebas.playground/timeline.xctimeline b/Verdnaturaventas/Verdnaturaventas/Pruebas.playground/timeline.xctimeline new file mode 100644 index 0000000..3c68706 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Pruebas.playground/timeline.xctimeline @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/Verdnaturaventas/Verdnaturaventas/Static/Colors.swift b/Verdnaturaventas/Verdnaturaventas/Static/Colors.swift new file mode 100644 index 0000000..df29917 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Static/Colors.swift @@ -0,0 +1,34 @@ +// +// Colors.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 27/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class Colors: NSObject { + + static let flowers: UInt = 0xb52a2a + static let greens: UInt = 0xafb42b + static let plants: UInt = 0x009688 + static let supplements: UInt = 0xe91e63 + static let artificial: UInt = 0xff9800 + static let manufacturing: UInt = 0x795548 + + static let darkFlowers: UInt = 0x501212 + static let darkGreens: UInt = 0x827717 + static let darkPlants: UInt = 0x004d40 + static let darkSupplements: UInt = 0x700C38 + static let darkArtificial: UInt = 0xe65100 + static let darkManufacturing: UInt = 0x3e2723 + + static let white: UInt = 0xFFFFFF + static let verdnatura: UInt = 0xA8D52A + + static let colors = [Values.FLORES: flowers, Values.VERDES: greens, Values.PLANTAS: plants, Values.ARTIFICIAL: artificial, Values.COMPLEMENTOS: supplements, Values.CONFECCION: manufacturing] + + static let darks = [Values.FLORES: darkFlowers, Values.VERDES: darkGreens, Values.PLANTAS: darkPlants, Values.ARTIFICIAL: darkArtificial, Values.COMPLEMENTOS: darkSupplements, Values.CONFECCION: darkManufacturing] + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Static/Values.swift b/Verdnaturaventas/Verdnaturaventas/Static/Values.swift new file mode 100644 index 0000000..91cfdf9 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Static/Values.swift @@ -0,0 +1,27 @@ +// +// Urls.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 28/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class Values: NSObject { + + static let BASE_URL_FULL: String = "http://verdnatura.es/vn-image-data/catalog/full/" + static let BASE_URL_SMALL: String = "http://verdnatura.es/vn-image-data/catalog/200x200/" + static let BASE_URL_LARGE: String = "http://verdnatura.es/vn-image-data/catalog/900x900/" + + static let FLORES = 1 + static let PLANTAS = 2 + static let COMPLEMENTOS = 3 + static let ARTIFICIAL = 4 + static let VERDES = 5 + static let CONFECCION = 7 + + static let CALLBACK_PAGO_OK = "http://ok/" + static let CALLBACK_PAGO_ERROR = "http://error/" + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Strings/ca.lproj/Localizable.strings b/Verdnaturaventas/Verdnaturaventas/Strings/ca.lproj/Localizable.strings new file mode 100644 index 0000000..7cf13f6 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Strings/ca.lproj/Localizable.strings differ diff --git a/Verdnaturaventas/Verdnaturaventas/Strings/en.lproj/Localizable.strings b/Verdnaturaventas/Verdnaturaventas/Strings/en.lproj/Localizable.strings new file mode 100644 index 0000000..c48697a Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Strings/en.lproj/Localizable.strings differ diff --git a/Verdnaturaventas/Verdnaturaventas/Strings/es.lproj/Localizable.strings b/Verdnaturaventas/Verdnaturaventas/Strings/es.lproj/Localizable.strings new file mode 100644 index 0000000..d5e8190 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Strings/es.lproj/Localizable.strings differ diff --git a/Verdnaturaventas/Verdnaturaventas/Strings/pt.lproj/Localizable.strings b/Verdnaturaventas/Verdnaturaventas/Strings/pt.lproj/Localizable.strings new file mode 100644 index 0000000..0db3898 Binary files /dev/null and b/Verdnaturaventas/Verdnaturaventas/Strings/pt.lproj/Localizable.strings differ diff --git a/Verdnaturaventas/Verdnaturaventas/Util/UtilDate.swift b/Verdnaturaventas/Verdnaturaventas/Util/UtilDate.swift new file mode 100644 index 0000000..ce6ea2e --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Util/UtilDate.swift @@ -0,0 +1,113 @@ +// +// UtilDate.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 14/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit + +class UtilDate: NSObject { + + static func getDayOfWeek(_ date: Date) -> String + { + let myCalendar = Calendar(identifier: Calendar.Identifier.gregorian) + let myComponents = (myCalendar as NSCalendar).components(.weekday, from: date) + + let weekDay = myComponents.weekday + switch weekDay { + case 1?: + return NSLocalizedString("calendar_sunday", comment: "") + case 2?: + return NSLocalizedString("calendar_monday", comment: "") + case 3?: + return NSLocalizedString("calendar_tuesday", comment: "") + case 4?: + return NSLocalizedString("calendar_wednesday", comment: "") + case 5?: + return NSLocalizedString("calendar_thursday", comment: "") + case 6?: + return NSLocalizedString("calendar_friday", comment: "") + case 7?: + return NSLocalizedString("calendar_saturday", comment: "") + default: + print("Error fetching days") + return "Day" + } + } + + static func getTextMonth(_ date: Date) -> String + { + let myCalendar = Calendar(identifier: Calendar.Identifier.gregorian) + let myComponents = (myCalendar as NSCalendar).components(.month, from: date) + + let month = myComponents.month + + switch month{ + case 1?: + return NSLocalizedString("calendar_january", comment: "") + case 2?: + return NSLocalizedString("calendar_february", comment: "") + case 3?: + return NSLocalizedString("calendar_march", comment: "") + case 4?: + return NSLocalizedString("calendar_april", comment: "") + case 5?: + return NSLocalizedString("calendar_may", comment: "") + case 6?: + return NSLocalizedString("calendar_june", comment: "") + case 7?: + return NSLocalizedString("calendar_july", comment: "") + case 8?: + return NSLocalizedString("calendar_august", comment: "") + case 9?: + return NSLocalizedString("calendar_september", comment: "") + case 10?: + return NSLocalizedString("calendar_october", comment: "") + case 11?: + return NSLocalizedString("calendar_november", comment: "") + case 12?: + return NSLocalizedString("calendar_december", comment: "") + default: + return "" + + } + + } + + static func getTextoFecha(_ date: Date) -> String + { + let myCalendar = Calendar(identifier: Calendar.Identifier.gregorian) + let myComponents = (myCalendar as NSCalendar).components(.day, from: date) + + let day = myComponents.day + + let fecha = String(format: "%@, %d de %@", getDayOfWeek(date), day!, getTextMonth(date)) + + return fecha + } + + static func addDays(_ date: Date, days: Int) -> Date + { + return (Calendar.current as NSCalendar).date(byAdding: .day, value: days, to: date, options: NSCalendar.Options(rawValue: 0))! + } + + static func stringToDate(_ fecha: String) -> Date { + + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = "yyyy-MM-dd" + + return dateFormatter.date(from: fecha)! + } + + static func dateToString(_ date: Date) -> String { + + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = "yyyy-MM-dd" + + return dateFormatter.string(from: date) + } + + +} diff --git "a/Verdnaturaventas/Verdnaturaventas/Views/\020ViewOrderResume.swift" "b/Verdnaturaventas/Verdnaturaventas/Views/\020ViewOrderResume.swift" new file mode 100644 index 0000000..b3a18dc --- /dev/null +++ "b/Verdnaturaventas/Verdnaturaventas/Views/\020ViewOrderResume.swift" @@ -0,0 +1,264 @@ +// +// ViewOrderResume.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 26/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewOrderResume: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + @IBOutlet weak var tableOrder: UITableView! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + @IBOutlet weak var buttonValidate: UIBarButtonItem! + @IBOutlet weak var navigation: UINavigationItem! + + var buttonOk : UIBarButtonItem! + + var mostrarAviso = false + var cambios = false + + var cellsTitle: Array = [] + var cellsValue: Array = [] + var segues: Array = ["segueClientes", "segueConsignatarios", "segueCalendar", "segueAgencias"] + + override func createView() { + super.createView() + buttonOk = buttonValidate + progress = progressBar + contenedor = tableOrder + UtilsIos.registerNib(tableOrder, cell: "CeldaDobleString") + self.tableOrder.rowHeight = 65.0 + if(mostrarAviso) + { + alertaCambios() + } + navigation.title = NSLocalizedString("order_modify", comment: "") + rewriteBackButton() + tableOrder.backgroundColor = UIColor.groupTableViewBackground + self.tableOrder.delegate = self + self.tableOrder.dataSource = self + } + + override func goBack() + { + if(cambios) + { + let alert = AlertCambios(v: self) + alert.showDialog() + } + + else + { + _ = self.navigationController?.popViewController(animated: true) + } + } + + override func prepareView() { + cellsTitle = [NSLocalizedString("fragment_configurar_pedido_cliente", comment: "").uppercased(), + NSLocalizedString("main_delivery_address", comment: "").uppercased(), + NSLocalizedString("main_arraival", comment: "").uppercased(), + NSLocalizedString("main_agency", comment: "").uppercased()] + + + var agencia = NSLocalizedString("main_select", comment: "") + + if(aplication.pedido?.agencia != nil) + { + agencia = (aplication.pedido?.agencia?.Agencia)! + } + + + cellsValue = [(aplication.pedido?.cliente?.Cliente)!, + (aplication.pedido?.consignatarioActivo?.Domicilio)!, + UtilDate.getTextoFecha(UtilDate.stringToDate((aplication.pedido?.Fecha)!)), + agencia] + + if(aplication.cliente?.Tipo != "trabajador" || (self.aplication.pedido!.rows?.count)! > 0) + { + if(self.segues.count > 3) + { + segues.removeFirst() + } + cellsTitle.removeFirst() + cellsValue.removeFirst() + + } + tableOrder.reloadData() + refrescarCarrito() + setButton() + + + } + + func setButton() + { + + if(mostrarAviso) + { + cambios = true + } + + else if(aplication.pedido!.rows!.count > 0) + { + + if(aplication.pedido!.agenciaAntigua != nil) + { + if(aplication.pedido?.agencia == nil) + { + cambios = false + } + else + { + cambios = true + } + } + + if(aplication.pedido!.FechaAntigua != nil) + { + if(aplication.pedido?.Fecha == nil || aplication.pedido?.agencia == nil) + { + cambios = false + } + else + { + cambios = true + } + } + } + + if(cambios) + { + self.navigationItem.rightBarButtonItem = buttonOk + } + else + { + self.navigationItem.rightBarButtonItem = nil + } + + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + return cellsTitle.count + } + + + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaDobleString") as! CeldaDobleString + + celda.pintarCelda(cellsTitle[indexPath.row], c: cellsValue[indexPath.row], color: UIColor.white) + + return celda + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + launchSegue(segues[indexPath.row]) + + } + + func alertaCambios() + { + let alert = AlertCambioPedido(v: self) + alert.showDialog() + } + + @IBAction func clickComprobar(_ sender: AnyObject) { + if(aplication.pedido!.rows!.count > 0) + { + recalcularPrecios() + } + else + { + self.updateOrder() + } + } + + func recalcularPrecios() + { + showProgress(true) + let cmd = CmdRecalcularPrecios() + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + let diferencias = ControllerPedido.getDiferencias(cmd.order!.rows!) + if (diferencias.count > 0) { + self.showProgress(false) + let parameters = [cmd.order!.rows!, diferencias] as [Any] + self.launchSegue("segueDiferencias", sender: parameters as AnyObject?) + } else { + self.updateOrder() + } + }, + handlerRetry: { + self.showProgress(false) + self.recalcularPrecios() + }, + handlerAccept: { + self.showProgress(false) + } + ) + execute(cmd) + + } + + func updateOrder() + { + showProgress(true) + let cmd = CmdCrearOrder(p: aplication.pedido!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.aplication.pedido!.FechaAntigua = nil + self.aplication.pedido!.agenciaAntigua = nil + self.navigationController!.viewControllers = [self.navigationController!.viewControllers[0], self.navigationController!.viewControllers[self.navigationController!.viewControllers.count - 1]] + _ = self.navigationController?.popViewController(animated: true) + self.refrescarCarrito() + }, + handlerRetry: { + self.showProgress(false) + self.updateOrder() + }, + handlerAccept: { + self.showProgress(false) + } + ) + execute(cmd) + } + + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier == "segueDiferencias") + { + let viewRecalculados = segue.destination as! ViewPreciosRecalculados + let parameters = sender as! NSArray + viewRecalculados.rows = parameters[0] as? Array + viewRecalculados.diferencias = parameters[1] as? Array + } + else if(segue.identifier == "segueClientes") + { + let viewClientes = segue.destination as! ViewSearch + viewClientes.tipo = viewClientes.TIPO_CLIENTES + } + + } + + override func willMove(toParentViewController parent: UIViewController?) { + aplication.pedido!.agenciaAntigua = nil + aplication.pedido!.FechaAntigua = nil + + } + + override func viewDidDisappear(_ animated: Bool) { + super.viewDidAppear(animated) + aplication.pedido!.recuperado = false + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/MyView.swift b/Verdnaturaventas/Verdnaturaventas/Views/MyView.swift new file mode 100644 index 0000000..e901812 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/MyView.swift @@ -0,0 +1,90 @@ +// +// MyView.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary +import FSCalendar + +class MyViewVentas: MyView { + + var inicializado = false + var aplication = UIApplication.shared.delegate! as! AppDelegate + + override func createView() { + super.createView() + self.navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil) + } + + override var preferredStatusBarStyle : UIStatusBarStyle { + return .lightContent + } + + func verFamilia(_ reino: Int, nombre: String, cadena: String) -> ParametrosReino + { + + let parametros = ParametrosReino() + parametros.reino = reino as NSNumber? + parametros.nombre = nombre + parametros.fecha = aplication.pedido?.Fecha + parametros.consignatario = aplication.pedido?.consignatarioActivo?.Id_Consigna + parametros.agencia = aplication.pedido?.agencia?.Id_Agencia + parametros.cadena = cadena + + return parametros + + } + + func createNavigation() + { + self.navigationController?.navigationBar.barTintColor = UtilsIos.getColor(0x3e3e3f) + self.navigationController!.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName : UtilsIos.getColor(0xffffff)] + self.navigationController?.navigationBar.tintColor = UtilsIos.getColor(0xffffff) + } + + func tablaVacia(_ tabla: UITableView, text: String) + { + let label = UILabel(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: self.view.bounds.size.height)) + label.textAlignment = NSTextAlignment.center + label.text = text + + tabla.backgroundView = label + tabla.separatorStyle = UITableViewCellSeparatorStyle.none + } + + func collectionVacia(_ collection: UICollectionView, text: String) + { + let label = UILabel(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: self.view.bounds.size.height)) + label.textAlignment = NSTextAlignment.center + label.text = text + + collection.backgroundView = label + } + + func refrescarCarrito() + { + let tc = self.parent!.parent! as! TabView + if((self.aplication.pedido?.rows?.count)! > 0) + { + tc.tabBar.items![1].badgeValue = "\(self.aplication.pedido!.rows!.count)" + } + else{ + tc.tabBar.items![1].badgeValue = nil + } + + } + + func rewriteBackButton() + { + let imageBack = UIImage(named: "BackButton") + let buttonBack = UIBarButtonItem(image: imageBack, style: UIBarButtonItemStyle.plain, target: self, action: #selector(MyViewVentas.goBack)) + self.navigationItem.leftBarButtonItem = buttonBack + } + + func goBack(){} + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/TabView.swift b/Verdnaturaventas/Verdnaturaventas/Views/TabView.swift new file mode 100644 index 0000000..7cb103e --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/TabView.swift @@ -0,0 +1,91 @@ +// +// TabView.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 12/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class TabView: UITabBarController, UITabBarControllerDelegate { + + override func viewDidLoad() { + generateNavBar() + self.delegate = self + let tabItems = self.tabBar.items! as [UITabBarItem] + let tabItem0 = tabItems[0] as UITabBarItem + let tabItem1 = tabItems[1] as UITabBarItem + let tabItem2 = tabItems[2] as UITabBarItem + let tabItem3 = tabItems[3] as UITabBarItem + tabItem0.title = NSLocalizedString("order", comment: "") + tabItem1.title = NSLocalizedString("navigation_carrito_lista_compra", comment: "") + tabItem2.title = NSLocalizedString("buscar", comment: "") + tabItem3.title = NSLocalizedString("title_activity_cuenta", comment: "") + UIApplication.shared.statusBarStyle = .lightContent + } + + func generateNavBar() + { + tabBarController?.tabBarController?.tabBar.barTintColor = UtilsIos.getColor(0x3e3e3f) + } + + func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool { + + let aplication = UIApplication.shared.delegate! as! AppDelegate + + if(aplication.pedido!.recuperado!) + { + return false + } + + if(viewController.restorationIdentifier! == "navigationPedido") + { + if(tabBarController.selectedIndex == 0) + { + return false + } + + } + + else if(viewController.restorationIdentifier! == "navigationBuscar") + { + if(tabBarController.selectedIndex == 2) + { + return false + } + else if(aplication.pedido!.agencia == nil) + { + let alert = AlertAgency(v: self) + alert.showDialog() + return false + } + else + { + let nc = viewController as! UINavigationController + nc.popViewController(animated: false) + return true + } + } + + + else if(viewController.restorationIdentifier! == "navigationPanel") + { + if(tabBarController.selectedIndex == 3) + { + return false + } + else + { + let nc = viewController as! UINavigationController + nc.popViewController(animated: false) + return true + } + } + + return true + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewAccount.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewAccount.swift new file mode 100644 index 0000000..3f026d1 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewAccount.swift @@ -0,0 +1,70 @@ +// +// ViewAccount.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewAccount: UITableViewController { + + @IBOutlet weak var labelUser: UILabel! + @IBOutlet weak var labelClient: UILabel! + @IBOutlet weak var labelMail: UILabel! + @IBOutlet weak var labelPassword: UILabel! + @IBOutlet weak var labelInvoice: UILabel! + @IBOutlet weak var switchInvoice: UISwitch! + + let aplication = UIApplication.shared.delegate! as! AppDelegate + + var cliente: ClienteVentas? + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + cliente = ControllerPedido.obtenerCliente() + labelUser.text = cliente!.Cliente + labelClient.text = "\(cliente!.Id_Cliente!)" + labelMail.text = cliente!.Email! + labelPassword.text = NSLocalizedString("fragment-cuenta-cambiar-contrasena", comment: "") + labelInvoice.text = NSLocalizedString("fragment_cuenta_factura_email", comment: "") + switchInvoice.setOn(UtilsIos.toBool("\(cliente!.Mail!)")!, animated: false) + self.title = NSLocalizedString("navigation_panel_account", comment: "") + + } + + + @IBAction func switchChanged(_ sender: AnyObject) { + if switchInvoice.isOn { + cliente!.Mail = 1 + } else { + cliente!.Mail = 0 + } + modificarCliente() + + } + + func modificarCliente() + { + let ejecutador = Ejecutador.getInstance() + let cmd = CmdModificarCliente(cv: cliente!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.cliente! = cmd.cliente! + ControllerPedido.modificarCliente(cmd.cliente!) + }, + handlerRetry: { + self.modificarCliente() + }, + handlerAccept: {} + ) + + ejecutador.exeute(cmd, view: self) + + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewArticulos.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewArticulos.swift new file mode 100644 index 0000000..b0f2e73 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewArticulos.swift @@ -0,0 +1,107 @@ +// +// ViewArticulos.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 28/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewArticulos: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + + @IBOutlet weak var progressBar: UIActivityIndicatorView! + @IBOutlet weak var tableArticulos: UITableView! + + var tipo = 0 + var cadena = "" + var tipoNombre = "" + var articulos: Array = [] + + override func createView() { + super.createView() + UtilsIos.registerNib(tableArticulos, cell: "CeldaArticuloTags") + contenedor = tableArticulos + progress = progressBar + self.title = tipoNombre + tableArticulos.backgroundColor = UIColor.groupTableViewBackground + tableArticulos.rowHeight = 196 + } + + override func viewWillAppear(_ animated: Bool) { + tableArticulos.reloadData() + if(articulos.count == 0) + { + getArticulos() + } + } + + func getArticulos() + { + showProgress(true) + let cmd = CmdObtenerStock(f: (aplication.pedido?.Fecha)!, c: (aplication.pedido?.consignatarioActivo?.Id_Consigna)!, a: (aplication.pedido!.agencia?.Id_Agencia)!, t: NSNumber(value: tipo), cad: cadena) + + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.articulos = cmd.articulos! + self.inicializado = true + self.tableArticulos.reloadData() + self.showProgress(false) + }, + handlerRetry: { + self.getArticulos() + self.showProgress(false) + }, + handlerAccept: { + self.inicializado = true + self.tableArticulos.reloadData() + self.showProgress(false) + } + ) + execute(cmd) + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return articulos.count + } + + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + if articulos.count == 0 + { + if inicializado + { + collectionVacia(collectionView, text: NSLocalizedString("no_articulos_disponibles", comment: "")) + } + return 0 + } + else + { + return articulos.count + } + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableArticulos.dequeueReusableCell(withIdentifier: "CeldaArticuloTags", for: indexPath) as! CeldaArticuloTags + cell.pintarCelda(articulos[indexPath.row]) + return cell + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + launchSegue("segueDetalleArticulo", sender: indexPath.row as AnyObject?) + } + + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier == "segueDetalleArticulo") + { + let articulo = articulos[sender as! Int] + let viewDetalle = segue.destination as! ViewDetalleArticulo + viewDetalle.articulo = articulo + } + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewCarrito.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewCarrito.swift new file mode 100644 index 0000000..67fd582 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewCarrito.swift @@ -0,0 +1,123 @@ +// +// ViewCarrito.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 8/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewCarrito: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + + @IBOutlet weak var tableCarrito: UITableView! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + + + override func createView() { + super.createView() + progress = progressBar + contenedor = tableCarrito + UtilsIos.registerNib(tableCarrito, cell: "CeldaCarrito") + self.tableCarrito.rowHeight = 58.0 + tableCarrito.backgroundColor = UIColor.groupTableViewBackground + tableCarrito.tableFooterView = UIView() + createNavigation() + } + + override func setTitles() { + self.title = NSLocalizedString("navigation_carrito_lista_compra", comment: "") + } + + + override func viewDidAppear(_ animated: Bool) { + tableCarrito.reloadData() + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + if aplication.pedido!.rows!.count == 0{ + tablaVacia(tableCarrito, text: NSLocalizedString("activity_validar_pedido_no_articulos", comment: "")) + return 0 + } + else + { + tableCarrito.backgroundView = nil + return (aplication.pedido?.rows?.count)! + } + } + + @IBAction func clickTrash(_ sender: AnyObject) { + let alert = AlertVaciarCarrito(v: self) + alert.showDialog() + } + + @IBAction func clickValidar(_ sender: AnyObject) { + if(aplication.pedido!.rows!.count > 0) + { + launchSegue("segueValidarPedido") + } + else + { + let alert = AlertNoArticulos(v: self) + alert.showDialog() + } + + } + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaCarrito") as! CeldaCarrito + let row = aplication.pedido?.rows![indexPath.row] + let title = "\(row!.articulo!.Article!)" + + var subtitle = "\(row!.amount!)" + var total = " " + if(ControllerPreferences.mostrarPrecios()) + { + subtitle = "\(row!.amount!)x \(UtilsNumbers.roundDouble(row!.tarifa!.price!, decimals: 2))€" + let t = (row?.amount?.doubleValue)! * (row?.tarifa?.price?.doubleValue)! + total = "\(t)€" + } + + celda.pintarCelda((row!.articulo!.foto)!, title: title, subtitle: subtitle, total: total) + + return celda + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + let row = aplication.pedido?.rows![indexPath.row] + let alert = AlertItemCarrito(v: self, row: row!) + alert.showDialog() + } + + func updateRow() + { + showContenedor(true) + let cmd = CmdCrearOrder(p: aplication.pedido!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.aplication.pedido = cmd.order! + self.tableCarrito.reloadData() + self.showProgress(false) + self.refrescarCarrito() + }, + handlerRetry: { + self.showProgress(false) + self.updateRow() + }, + handlerAccept: { + self.aplication.pedido!.rows = self.aplication.pedido!.rowsOld! + self.showProgress(false) + + } + ) + execute(cmd) + + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewChangePassword.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewChangePassword.swift new file mode 100644 index 0000000..c7c5b4c --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewChangePassword.swift @@ -0,0 +1,105 @@ +// +// ViewChangePassword.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewChangePassword: MyViewVentas { + + @IBOutlet weak var edtOldPassword: UITextField! + @IBOutlet weak var edtNewPasswordOne: UITextField! + @IBOutlet weak var edtNewPasswordTwo: UITextField! + @IBOutlet weak var cardContenedor: CardView! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + + var cliente: ClienteVentas? + + override func createView() { + super.createView() + self.title = NSLocalizedString("cambiar_password", comment: "") + edtOldPassword.placeholder = NSLocalizedString("old_password", comment: "") + edtNewPasswordOne.placeholder = NSLocalizedString("new_password", comment: "") + edtNewPasswordTwo.placeholder = NSLocalizedString("re_new_password", comment: "") + contenedor = cardContenedor + progress = progressBar + cliente = ControllerPedido.obtenerCliente() + if(cliente!.Id_Cliente != aplication.cliente?.Id_Cliente) + { + edtOldPassword.isUserInteractionEnabled = false + edtOldPassword.isEnabled = false + } + showProgress(false) + } + + @IBAction func accept(_ sender: AnyObject) { + cambiarPassword(ControllerPreferences.recuperarPassword(), nuevoPassword: edtNewPasswordOne.text!, nuevoPassword2: edtNewPasswordTwo.text!) + } + + func cambiarPassword(_ oldPassword: String, nuevoPassword: String, nuevoPassword2: String) + { + let msg = comprobarPassword(oldPassword, newPassword: nuevoPassword, newPassword2: nuevoPassword2) + if(msg == "") + { + sendNewPassword(nuevoPassword) + } + else + { + let alert = AlertErrorPassword(v: self) + alert.message = msg + alert.showDialog() + } + + } + + func sendNewPassword(_ password: String) + { + let pass = ControllerPreferences.codificarBase64(password) + let cmd = CmdModificarPassword(password: pass, cid: aplication.cliente!.Id_Cliente!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + if(self.cliente!.Id_Cliente == self.aplication.cliente!.Id_Cliente) + { + ControllerPreferences.saveUser(ControllerPreferences.recuperarUsuario(), pass: password) + } + let alert = AlertPasswordCambiado(v: self) + alert.showDialog() + }, + handlerRetry: { + self.sendNewPassword(password) + }, + handlerAccept: { + + } + ) + + execute(cmd) + } + + func comprobarPassword(_ oldPassword: String, newPassword: String, newPassword2: String) -> String + { + var msg = "" + + let password = ControllerPreferences.recuperarPassword() + if(cliente!.Id_Cliente == aplication.cliente!.Id_Cliente && oldPassword != "" && password == oldPassword) + { + if(newPassword == "" || newPassword2 == "" || newPassword != newPassword2) { + msg = NSLocalizedString("fragment_cambiar_password_mensaje_aviso_uno", comment: "") + } + } + else + { + msg = NSLocalizedString("fragment_cambiar_password_mensaje_aviso_dos", comment: "") + } + + return msg + + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewDetalleArticulo.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewDetalleArticulo.swift new file mode 100644 index 0000000..b95a09b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewDetalleArticulo.swift @@ -0,0 +1,133 @@ +// +// ViewDetalleArticulo.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewDetalleArticulo: MyViewVentas { + + + @IBOutlet weak var imageArticulo: UIImageViewAsyncVentas! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + + @IBOutlet weak var labelNombre: UILabel! + @IBOutlet weak var labelProductor: UILabel! + @IBOutlet weak var labelColor: UILabel! + @IBOutlet weak var labelMedida: UILabel! + @IBOutlet weak var labelDisponible: UILabel! + @IBOutlet weak var valueColor: UILabel! + @IBOutlet weak var valueMedida: UILabel! + @IBOutlet weak var valueDisponibler: UILabel! + @IBOutlet weak var labelDesde: UILabel! + @IBOutlet weak var valuePrice: UILabel! + @IBOutlet weak var buttonComprar: UIButton! + @IBOutlet weak var scrollView: UIScrollView! + + var articulo: ArticuloVentasTags? + //var titlesDatos = [] + //var dataDatos = [] + + override func createView() { + scrollView.isScrollEnabled = true + imageArticulo.clipsToBounds = true + progress = progressBar + contenedor = scrollView + valueColor.textColor = UtilsIos.getColor(Colors.colors[(articulo?.Reino?.intValue)!]!) + valueMedida.textColor = UtilsIos.getColor(Colors.colors[(articulo?.Reino?.intValue)!]!) + valueDisponibler.textColor = UtilsIos.getColor(Colors.colors[(articulo?.Reino?.intValue)!]!) + buttonComprar.backgroundColor = UtilsIos.getColor(Colors.colors[(articulo?.Reino?.intValue)!]!) + buttonComprar.setTitle(NSLocalizedString("fragment_articulo_comprar", comment: ""), for: UIControlState()) + self.navigationController?.navigationBar.barTintColor = UtilsIos.getColor(Colors.colors[(articulo?.Reino!.intValue)!]!, alpha: 0.0) + self.title = articulo?.Article! + generateTapImage() + } + + func generateTapImage(){ + let singleTap = UITapGestureRecognizer(target: self, action: #selector(ViewDetalleArticulo.tapDetected)) + singleTap.numberOfTapsRequired = 1 // you can change this value + imageArticulo.isUserInteractionEnabled = true + imageArticulo.addGestureRecognizer(singleTap) + } + + func tapDetected(){ + launchSegue("segueViewImage") + } + + func getArticulo() + { + let pedido = aplication.pedido! + showProgress(true) + let cmd = CmdObtenerArticuloVenta(f: pedido.Fecha!, c: (pedido.consignatarioActivo?.Id_Consigna)!, a: pedido.agencia!.Id_Agencia!, t: articulo!.Id_Tipo!, iid: articulo!.Id_Article!, wid: articulo!.warehouse_id!) + + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.articulo = cmd.articulo + self.setValues() + self.showProgress(false) + self.inicializado = true + }, + handlerRetry: { + self.showProgress(false) + self.getArticulo() + }, + handlerAccept: { + _ = self.navigationController?.popToRootViewController(animated: true) + } + + ) + + execute(cmd) + } + + override func viewWillAppear(_ animated: Bool) { + if(inicializado) + { + setValues() + } + else + { + getArticulo() + } + } + + + func setValues() + { + imageArticulo.downloadImage(String(format: "%@%@", Values.BASE_URL_LARGE, self.articulo!.foto!)) + labelNombre.text = articulo?.Article + labelColor.text = NSLocalizedString("color", comment: "").uppercased() + labelDisponible.text = NSLocalizedString("disp", comment: "").uppercased() + labelMedida.text = NSLocalizedString("medida", comment: "").uppercased() + valueDisponibler.text = "\(articulo!.available!)" + if(ControllerPreferences.mostrarPrecios()) + { + labelDesde.text = NSLocalizedString("desde", comment: "") + valuePrice.text = "\(ControllerArticulo.getMinPrice(articulo!))€" + } + else + { + labelDesde.text = " " + valuePrice.text = " " + } + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier == "seguePrecios") + { + let viewPrecios = segue.destination as! DialogPrecios + viewPrecios.articulo = articulo + } + else if(segue.identifier == "segueViewImage"){ + let viewImage = segue.destination as! ViewImage + viewImage.foto = (articulo?.foto)! + viewImage.title = (articulo?.Article)! + } + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewFamilias.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewFamilias.swift new file mode 100644 index 0000000..d1abcb3 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewFamilias.swift @@ -0,0 +1,137 @@ +// +// ViewFamilias.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 27/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewFamilias: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + @IBOutlet weak var tableFamilias: UITableView! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + + var color: UInt = 0xffffff + var colorDark: UInt = 0xffffff + var colorTint: UInt = 0xffffff + var parametros: ParametrosReino? + var familias: Array = [] + + override func createView() { + super.createView() + contenedor = tableFamilias + progress = progressBar + color = Colors.colors[parametros!.reino!.intValue]! + colorDark = Colors.darks[parametros!.reino!.intValue]! + self.navigationController?.navigationBar.barTintColor = UtilsIos.getColor(color, alpha: 0.0) + self.navigationController?.navigationBar.tintColor = UtilsIos.getColor(colorTint) + self.title = parametros!.nombre!.uppercaseFirst + let nib = UINib(nibName: "CeldaString", bundle: nil) + tableFamilias.register(nib, forCellReuseIdentifier: "CeldaString") + tableFamilias.rowHeight = 50.0 + tableFamilias.backgroundColor = UIColor.groupTableViewBackground + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + if(familias.count == 0) + { + getFamilias() + } + } + + func getFamilias() + { + showProgress(true) + let cmd = CmdObtenerTipos(r: (parametros?.reino)!, c: (parametros?.cadena)!, a: (parametros?.agencia)!, con: (parametros?.consignatario)!, f: (parametros?.fecha)!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.familias = cmd.tipos + self.inicializado = true + self.tableFamilias.reloadData() + self.showProgress(false) + }, + handlerRetry: { + self.getFamilias() + self.showProgress(false) + }, + handlerAccept: { + self.inicializado = true + self.tableFamilias.reloadData() + self.showProgress(false) + } + ) + execute(cmd) + } + + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + if familias.count == 0 + { + if(inicializado) + { + tablaVacia(tableFamilias, text: NSLocalizedString("no_articulos_disponibles", comment: "")) + } + return 0 + } + else + { + return familias.count + } + + } + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaString") as! CeldaString + + celda.accessoryType = UITableViewCellAccessoryType.disclosureIndicator + celda.tintarCelda(color) + + let tipo = familias[indexPath.row] + + celda.pintarCelda(tipo.Tipo!, color: UIColor.white) + + return celda + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + var dictionary: Dictionary = ["cadena": "" as AnyObject, "tipo": 0 as AnyObject, "tipoNombre": "" as AnyObject] + dictionary["cadena"] = parametros?.cadena as AnyObject? + dictionary["tipo"] = familias[indexPath.row].Tipo_Id + dictionary["tipoNombre"] = familias[indexPath.row].Tipo! as AnyObject + launchSegue("segueArticulos", sender: dictionary as AnyObject?) + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier! == "segueArticulos") + { + let viewArticulos = segue.destination as! ViewArticulos + let dictionary = sender as! Dictionary + viewArticulos.tipo = dictionary["tipo"] as! Int + viewArticulos.cadena = dictionary["cadena"] as! String + viewArticulos.tipoNombre = dictionary["tipoNombre"] as! String + } + } + + +} + +extension String { + var first: String { + return String(characters.prefix(1)) + } + var last: String { + return String(characters.suffix(1)) + } + var uppercaseFirst: String { + return first.uppercased() + String(characters.dropFirst()) + } +} + diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewImage.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewImage.swift new file mode 100644 index 0000000..020dfcc --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewImage.swift @@ -0,0 +1,30 @@ +// +// ViewImage.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/3/17. +// Copyright © 2017 Nelo Sanchez Gomiz. All rights reserved. +// + +import Foundation +import BaseLibrary + +class ViewImage: MyViewVentas{ + + + @IBOutlet weak var imageFoto: UIImageViewAsyncVentas! + + var foto = "" + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + let url = String(format: "%@%@", Values.BASE_URL_FULL, foto) + imageFoto.downloadImage(url) + rewriteBackButton() + } + + override func goBack() { + self.navigationController?.popViewController(animated: true) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewLineasPedido.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewLineasPedido.swift new file mode 100644 index 0000000..fd75524 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewLineasPedido.swift @@ -0,0 +1,116 @@ +// +// ViewLineasPedido.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 7/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewLineasPedido: MyViewVentas, UITableViewDelegate, UITableViewDataSource, LaunchSegueFromImage { + + @IBOutlet weak var progressBar: UIActivityIndicatorView! + @IBOutlet weak var tableLineas: UITableView! + + var pedido: TicketRecepcion? + var lineasRecuperadas: Array = [] + + override func createView() { + super.createView() + contenedor = tableLineas + UtilsIos.registerNib(tableLineas, cell: "CeldaLineasRecibidas") + self.tableLineas.rowHeight = 69.0 + tableLineas.backgroundColor = UIColor.groupTableViewBackground + tableLineas.tableFooterView = UIView() + progress = progressBar + loadPedidos() + markLine(origin: lineasRecuperadas, dest: pedido!.Lineas, add: false) + } + + override func setTitles() { + self.title = NSLocalizedString("fragment_listado_pedidos_recivira", comment: "") + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + return pedido!.Lineas.count + } + + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaLineasRecibidas") as! CeldaLineasRecibidas + let row = pedido!.Lineas[indexPath.row] + let label = row.Concepte! + " " + String(row.Medida!.intValue) + " " + row.Color! + + celda.pintarCelda(foto: row.Foto!, line: label, quantity: row.Cantidad!, price: Double(row.Preu!)) + celda.delegate = self + celda.row = indexPath.row + + changeCell(cell: celda, ok: row.Ok!) + return celda + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + let line = (pedido?.Lineas[indexPath.row])! as TicketRecepcionLinea + line.Ok = !line.Ok! + markLine(origin: (pedido?.Lineas)!, dest: lineasRecuperadas, add: true) + let cell:CeldaLineasRecibidas = tableView.cellForRow(at: indexPath) as! CeldaLineasRecibidas + changeCell(cell: cell, ok: line.Ok!) + } + + func changeCell(cell: CeldaLineasRecibidas, ok: Bool){ + if(ok){ + cell.backgroundColor = UtilsIos.getColor(Colors.verdnatura) + } + else{ + cell.backgroundColor = UtilsIos.getColor(Colors.white) + } + + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier! == "segueViewImageRow"){ + let vc = segue.destination as! ViewImage + let line = sender as? TicketRecepcionLinea + vc.foto = (line?.Foto)! + vc.title = line?.Concepte + } + } + + func imageTapped(row: Int) { + launchSegue("segueViewImageRow", sender: pedido!.Lineas[row]) + } + + override func viewDidDisappear(_ animated: Bool) { + for line in lineasRecuperadas{ + line.FechaContar = UtilDate.dateToString(Date()) + } + MyFileManager.saveTicketLines(lines: lineasRecuperadas) + let cmd = CmdCheckMovimientos(m: (pedido?.Lineas)!) + execute(cmd) + } + + func markLine(origin: Array, dest: Array, add: Bool){ + for o in origin { + var marked = false + for d in dest{ + if o.Id_Movimiento == d.Id_Movimiento { + d.Ok = o.Ok + marked = true + break + } + } + if(!marked && add){ + lineasRecuperadas.append(o) + } + } + } + + func loadPedidos() { + lineasRecuperadas = MyFileManager.loadTicketLines() + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewListadoPedidosPendientes.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewListadoPedidosPendientes.swift new file mode 100644 index 0000000..813adf7 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewListadoPedidosPendientes.swift @@ -0,0 +1,105 @@ +// +// ViewListadoPedidosPendientes.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 21/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewListadoPedidosPendientes: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + @IBOutlet weak var tableOrders: UITableView! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + + var orders: Array = [] + + override func createView() { + super.createView() + self.progress = progressBar + self.contenedor = tableOrders + let nib = UINib(nibName: "CeldaDobleString", bundle: nil) + tableOrders.register(nib, forCellReuseIdentifier: "CeldaDobleString") + self.tableOrders.rowHeight = 65.0 + tableOrders.backgroundColor = UIColor.groupTableViewBackground + tableOrders.tableFooterView = UIView() + } + + override func setTitles() { + self.title = NSLocalizedString("fragment_pedidos_pendientes", comment: "").uppercaseFirst + } + + override func viewWillAppear(_ animated: Bool) { + if(orders.count == 0) + { + getPedidos() + } + aplication.pedido?.recuperado = false + } + + func getPedidos() + { + showProgress(true) + let cmd = CmdObtenerPedidosPendientes(cliente: self.aplication.pedido!.cliente!.Id_Cliente!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.orders = cmd.orders! + self.inicializado = true + self.tableOrders.reloadData() + self.showProgress(false) + }, + handlerRetry: { + self.showProgress(false) + self.getPedidos() + }, + handlerAccept: { + self.inicializado = true + self.tableOrders.reloadData() + self.showProgress(false) + } + ) + execute(cmd) + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + if orders.count == 0 + { + if inicializado{ + tablaVacia(tableOrders, text: NSLocalizedString("fragment_pedidos_pendientes_no_hay", comment: "")) + } + return 0 + } + else{ + return orders.count + } + } + + + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaDobleString") as! CeldaDobleString + + let order = orders[indexPath.row] + + celda.pintarCelda((order.Fecha)!, c: (order.agency)!, color: UIColor.white) + + return celda + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + launchSegue("segueResumen", sender: orders[indexPath.row]) + + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier == "segueResumen"){ + let destination = segue.destination as! ViewResumenPedido + destination.resumen = sender as? OrderResumen + } + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewLogin.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewLogin.swift new file mode 100644 index 0000000..67f45eb --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewLogin.swift @@ -0,0 +1,104 @@ +// +// ViewLogin.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewLogin: MyViewVentas, UITextFieldDelegate { + + + @IBOutlet weak var edtUser: UITextField! + @IBOutlet weak var edtPass: UITextField! + @IBOutlet weak var btnLogin: UIButton! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + @IBOutlet weak var panelLogin: UIView! + + override func createView() { + progress = progressBar + contenedor = panelLogin + UIApplication.shared.statusBarStyle = .lightContent + navigationController!.viewControllers = [self] + super.createView() + edtUser.delegate = self + edtPass.delegate = self + } + + override func setTitles() { + super.setTitles() + edtUser.attributedPlaceholder = NSAttributedString(string: NSLocalizedString("login_user", comment: ""), + attributes:[NSForegroundColorAttributeName: UtilsIos.getColor(0xA8D52A)]) + edtPass.attributedPlaceholder = NSAttributedString(string: NSLocalizedString("login_password", comment: ""), + attributes:[NSForegroundColorAttributeName: UtilsIos.getColor(0xA8D52A)]) + btnLogin.setTitle(NSLocalizedString("login_button", comment: ""), for: UIControlState()) + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + edtPass.text = "" + edtUser.text = "" + self.showProgress(false) + navigationController?.isNavigationBarHidden = true + } + + override func viewDidAppear(_ animated: Bool) { + if(ControllerPreferences.recuperarUsuario() != "" && ControllerPreferences.recuperarPassword() != "") + { + login(ControllerPreferences.recuperarUsuario(), pass: ControllerPreferences.recuperarPassword()) + } + } + + @IBAction func login(_ sender: AnyObject) { + login(edtUser.text!, pass: edtPass.text!) + } + + func login(_ user: String, pass: String) + { + showProgress(true) + ControllerPreferences.saveUser(user, pass: pass) + let cmd = CmdLogin(User: user, Pass: pass) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.aplication.cliente = cmd.Cliente + self.launchSegue("segueMain") + }, + handlerRetry: { + self.login(user, pass: pass) + }, + handlerAccept: { + ControllerPreferences.borrarUsuario() + self.showProgress(false) + } + ) + execute(cmd) + + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + let toViewController = segue.destination as UIViewController + // instead of using the default transition animation, we'll ask + // the segue to use our custom TransitionManager object to manage the transition animation + toViewController.transitioningDelegate = TransitionManager() + } + + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + self.view.endEditing(true) + } + + @IBAction func prepareForUnwind(_ segue: UIStoryboardSegue){ + + } + + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + self.view.endEditing(true) + login(edtUser.text!, pass: edtPass.text!) + return true + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewMain.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewMain.swift new file mode 100644 index 0000000..767429b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewMain.swift @@ -0,0 +1,145 @@ +// +// ViewMain.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 11/1/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewMain: MyViewVentas, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout{ + + + @IBOutlet weak var collectionBotones: UICollectionView! + @IBOutlet weak var lablClient: UILabel! + @IBOutlet weak var lablStreet: UILabel! + @IBOutlet weak var lablDate: UILabel! + @IBOutlet weak var lablAgency: UILabel! + + @IBOutlet weak var titleClient: UILabel! + @IBOutlet weak var titleStreet: UILabel! + @IBOutlet weak var titleDate: UILabel! + @IBOutlet weak var titleAgency: UILabel! + @IBOutlet weak var titlePending: UILabel! + + + let titles = [NSLocalizedString("main_flowers", comment: ""), + NSLocalizedString("main_greens", comment: ""), + NSLocalizedString("main_plants", comment: ""), + NSLocalizedString("main_artificial", comment: ""), + NSLocalizedString("main_supplements", comment: ""), + NSLocalizedString("main_manufacturing", comment: "")] + + let images = ["flor.png", "verde.png", "planta.png", "artificial.png", "complemento.png", "confeccion.png"] + + let ids = [Values.FLORES, Values.VERDES, Values.PLANTAS, Values.ARTIFICIAL, Values.COMPLEMENTOS, Values.CONFECCION] + + override func createView() { + super.createView() + UtilsIos.registerNibCollection(collectionBotones, cell: "CeldaBoton") + self.tabBarController?.tabBar.tintColor = UtilsIos.getColor(0x3e3e3f) + self.tabBarController?.tabBar.clipsToBounds = true + self.navigationController!.viewControllers = [self] + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + createNavigation() + lablDate.text = UtilDate.getTextoFecha(UtilDate.stringToDate((aplication.pedido?.Fecha)!)) + if(aplication.pedido?.agencia != nil) + { + lablAgency.text = aplication.pedido?.agencia?.Agencia + } + else + { + lablAgency.text = NSLocalizedString("main_select", comment: "") + } + if(aplication.pedido!.cliente == nil) + { + self.aplication.pedido!.cliente = aplication.cliente + self.aplication.pedido!.consignatarioActivo = ControllerPedido.getConsignatarioDefecto() + } + self.lablClient.text = aplication.pedido!.cliente!.Cliente + self.lablStreet.text = aplication.pedido!.consignatarioActivo!.Domicilio + } + + + + override func setTitles() { + titleClient.text = NSLocalizedString("fragment_configurar_pedido_cliente", comment: "").uppercased() + titleStreet.text = NSLocalizedString("main_delivery_address", comment: "").uppercased() + titleDate.text = NSLocalizedString("main_arraival", comment: "").uppercased() + titleAgency.text = NSLocalizedString("main_agency", comment: "").uppercased() + titlePending.text = NSLocalizedString("fragment_pedidos_pendientes", comment: "").uppercased() + self.title = NSLocalizedString("order", comment: "") + } + + func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { + return 1 + } + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return images.count + } + + + internal func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CeldaBoton", for: indexPath as IndexPath) as! CeldaBoton + cell.pintarCelda(images[indexPath.row]) + return cell + } + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + if(ControllerPedido.comprobarSeleccionCliente()) { + if (aplication.pedido?.agencia != nil){ + let parametros = verFamilia(ids[indexPath.row], nombre: titles[indexPath.row], cadena: "") + launchSegue("segueFamilias", sender: parametros) + } + else{ + let alert = AlertAgency(v: self) + alert.showDialog() + + } + } + + } + + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize + { + + let collectionViewWidth = self.collectionBotones.bounds.size.width / 3 + + + return CGSize(width: collectionViewWidth, height: collectionViewWidth) + } + + + @IBAction func clickOrder(sender: UITapGestureRecognizer) { + + if((aplication.pedido?.rows?.count)! > 0){ + let alert = AlertRows(v: self) + alert.showDialog() + } + else{ + launchSegue("segueOrder") + } + + } + + @IBAction func clickPendingOrder(sender: AnyObject) { + launchSegue("seguePedidosPendientes") + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if (segue.identifier! == "segueFamilias") { + let viewFamilias = segue.destination as! ViewFamilias + let parametros = sender as! ParametrosReino + viewFamilias.parametros = parametros + } + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewNavegador.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewNavegador.swift new file mode 100644 index 0000000..19bafa7 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewNavegador.swift @@ -0,0 +1,159 @@ +// +// ViewNavegador.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 23/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewNavegador: MyViewVentas, UIWebViewDelegate { + + @IBOutlet weak var webView: UIWebView! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + @IBOutlet weak var navigation: UINavigationItem! + @IBOutlet weak var navigationBar: UINavigationBar! + + + var datos: DatosPasarBanco? + var cantidad: NSNumber? = 0 + var fecha: String? = "" + var cliente: NSNumber? = 0 + var deuda: Bool = false + var pagado: Bool = false + + override func createView() { + super.createView() + contenedor = webView + progress = progressBar + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + UIApplication.shared.statusBarStyle = UIStatusBarStyle.default + obtenerDatosPasarBanco() + } + + override func setTitles() { + navigation.title = NSLocalizedString("pasarela_pago", comment: "") + } + + @IBAction func clickBack(_ sender: AnyObject) { + back() + } + + func generateWebView() + { + + let url = URL(string: datos!.Url!) + let mutableURL = NSMutableURLRequest(url:url!) + mutableURL.httpMethod = "POST" + let data = generateData().data(using: String.Encoding.utf8) + mutableURL.httpBody = data + webView.loadRequest(mutableURL as URLRequest) + + } + + func generateData() -> String + { + let data = "Ds_SignatureVersion=\(datos!.DSSignature!)&Ds_MerchantParameters=\(datos!.EncodedParams!)&Ds_Signature=\(datos!.Signature!)" + + return data + } + + func obtenerDatosPasarBanco() + { + showProgress(true); + if(deuda) { + cliente = aplication.cliente!.Id_Cliente! + fecha = UtilDate.dateToString(Date()) + } + + let cmd = CmdObtenerDatosPasarBanco(c: cantidad!, f: fecha!, cli: cliente!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.datos = cmd.datos! + self.generateWebView() + }, + handlerRetry: { + self.showProgress(false) + self.obtenerDatosPasarBanco() + }, + handlerAccept: {} + ) + + execute(cmd) + } + + func transactionEnd(_ url: String, transaccion: NSNumber) + { + var status = "" + if(url == Values.CALLBACK_PAGO_OK) + { + status = "ok" + pagado = true + } + else + { + status = "ko" + pagado = false + } + + showProgress(true); + let cmd = CmdTransactionEnd(s: status, t: transaccion) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.showProgress(false) + self.launchSegue("segueNavegadorFinalizar", sender: Values.CALLBACK_PAGO_OK as AnyObject?) + }, + handlerRetry: { + self.transactionEnd(url, transaccion: transaccion) + }, + handlerAccept: { + self.back() + } + ) + + execute(cmd); + } + + + func back() + { + launchSegue("segueNavegadorFinalizar", sender: Values.CALLBACK_PAGO_ERROR as AnyObject?) + } + + func webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType: UIWebViewNavigationType) -> Bool + { + if(request.url!.absoluteString == Values.CALLBACK_PAGO_OK || request.url!.absoluteString == Values.CALLBACK_PAGO_ERROR){ + transactionEnd((request.url?.absoluteString)!, transaccion: NSNumber(value: Int(datos!.DSOrder!)! as Int)) + } + return true + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + + let vc = segue.destination as! DialogFinalizarPedido + vc.transaction = sender as! String + vc.deuda = deuda + + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + UIApplication.shared.statusBarStyle = .lightContent + } + + func webViewDidStartLoad(_ webView: UIWebView) { + showProgress(true) + } + + func webViewDidFinishLoad(_ webView: UIWebView) { + showProgress(false) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewPanel.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewPanel.swift new file mode 100644 index 0000000..87168da --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewPanel.swift @@ -0,0 +1,86 @@ +// +// ViewPanel.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewPanel: UITableViewController { + + + @IBOutlet weak var labelAccount: UILabel! + @IBOutlet weak var labelShippings: UILabel! + @IBOutlet weak var labelPagos: UILabel! + @IBOutlet weak var labelOcultarPrecios: UILabel! + @IBOutlet weak var labelExit: UILabel! + @IBOutlet weak var swicthOcultarPrecios: UISwitch! + @IBOutlet weak var imageAccount: UIImageView! + @IBOutlet weak var imageEnvios: UIImageView! + @IBOutlet weak var imagePagos: UIImageView! + @IBOutlet weak var imageOcultar: UIImageView! + @IBOutlet weak var imageSalir: UIImageView! + + override func viewWillAppear(_ animated: Bool) { + + labelAccount.text = NSLocalizedString("navigation_panel_account", comment: "") + labelShippings.text = NSLocalizedString("navigation_panel_shippings", comment: "") + labelPagos.text = NSLocalizedString("navigation_panel_pagos", comment: "") + labelOcultarPrecios.text = NSLocalizedString("navigation_panel_ocultar_precios", comment: "") + labelExit.text = NSLocalizedString("navigation_panel_exit", comment: "") + swicthOcultarPrecios.setOn(!ControllerPreferences.mostrarPrecios(), animated: false) + + imageAccount.image = imageAccount.image!.withRenderingMode(UIImageRenderingMode.alwaysTemplate) + imageAccount.tintColor = UtilsIos.getColor(0x030303) + + imageEnvios.image = imageEnvios.image!.withRenderingMode(UIImageRenderingMode.alwaysTemplate) + imageEnvios.tintColor = UtilsIos.getColor(0x030303) + + imagePagos.image = imagePagos.image!.withRenderingMode(UIImageRenderingMode.alwaysTemplate) + imagePagos.tintColor = UtilsIos.getColor(0x030303) + + imageOcultar.image = imageOcultar.image!.withRenderingMode(UIImageRenderingMode.alwaysTemplate) + imageOcultar.tintColor = UtilsIos.getColor(0x030303) + + imageSalir.image = imageSalir.image!.withRenderingMode(UIImageRenderingMode.alwaysTemplate) + imageSalir.tintColor = UtilsIos.getColor(0x030303) + + createNavigation() + + self.title = NSLocalizedString("title_activity_cuenta", comment: "") + + } + + @IBAction func switchChanged(_ sender: AnyObject) { + ControllerPreferences.setMostrarPrecios(swicthOcultarPrecios.isOn) + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + if(indexPath.row == 4) + { + logout() + } + } + + func logout() + { + let aplication = UIApplication.shared.delegate! as! AppDelegate + ControllerPreferences.borrarUsuario() + aplication.cliente = ClienteVentas() + aplication.createOrder() + self.performSegue(withIdentifier: "segueLogout", sender: self) + } + + func createNavigation() + { + self.navigationController?.navigationBar.barTintColor = UtilsIos.getColor(0x3e3e3f) + self.navigationController!.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName : UtilsIos.getColor(0xffffff)] + self.navigationController?.navigationBar.tintColor = UtilsIos.getColor(0xffffff) + self.navigationItem.backBarButtonItem = UIBarButtonItem(title:"", style:.plain, target:nil, action:nil) + + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewPanel/ViewChangeMail.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewPanel/ViewChangeMail.swift new file mode 100644 index 0000000..50d187f --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewPanel/ViewChangeMail.swift @@ -0,0 +1,70 @@ +// +// ViewChangeMail.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 29/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewChangeMail: MyViewVentas { + + + @IBOutlet weak var editMail: UITextField! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + @IBOutlet weak var txtAntiguoMail: UILabel! + @IBOutlet weak var cardContenedor: CardView! + + var cliente: ClienteVentas? + + override func createView() { + super.createView() + progress = progressBar + contenedor = cardContenedor + cliente = ControllerPedido.obtenerCliente() + self.title = NSLocalizedString("cambiar_email", comment: "") + editMail.placeholder = NSLocalizedString("new_email", comment: "") + editMail.leftViewMode = UITextFieldViewMode.always + let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: 15, height: self.editMail.frame.height)) + editMail.leftView = paddingView + editMail.layer.borderColor = UIColor.groupTableViewBackground.cgColor + txtAntiguoMail.text = cliente!.Email! + showProgress(false) + + } + + func modificarCliente() + { + showProgress(true) + let cmd = CmdModificarCliente(cv: cliente!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + ControllerPedido.modificarCliente(cmd.cliente!) + let alert = AlertEmailModificado(v: self) + alert.showDialog() + }, + handlerRetry: { + self.showProgress(false) + self.modificarCliente() + }, + handlerAccept: { + self.showProgress(false) + } + ) + + execute(cmd) + + } + + + @IBAction func accept(_ sender: AnyObject) { + cliente!.Email = editMail.text! + modificarCliente() + + } + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewPreciosRecalculados.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewPreciosRecalculados.swift new file mode 100644 index 0000000..3831828 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewPreciosRecalculados.swift @@ -0,0 +1,88 @@ +// +// ViewPreciosRecalculados.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 17/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewPreciosRecalculados: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + @IBOutlet weak var tablaDiferencias: UITableView! + var rows: Array? + var diferencias: Array? + + override func createView() { + super.createView() + mostrarAlerta() + UtilsIos.registerNib(tablaDiferencias, cell: "CeldaPrecioRecalculado") + self.tablaDiferencias.rowHeight = 67.0 + tablaDiferencias.tableFooterView = UIView() + tablaDiferencias.backgroundColor = UIColor.groupTableViewBackground + } + + override func setTitles() { + self.title = NSLocalizedString("precios_recalculados", comment: "") + } + + func mostrarAlerta() + { + let alert = AlertPreciosRecalculados(v: self) + alert.showDialog() + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + return diferencias!.count + } + + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaPrecioRecalculado") as! CeldaPrecioRecalculado + let row = diferencias![indexPath.row] + + celda.pintarCelda(row) + + return celda + } + + @IBAction func clickAccept(_ sender: AnyObject) { + aplication.pedido!.rowsOld = aplication.pedido!.rows! + aplication.pedido!.rows = rows + updateOrder() + } + + func updateOrder() + { + showProgress(true) + let cmd = CmdCrearOrder(p: aplication.pedido!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.aplication.pedido! = cmd.order! + self.aplication.pedido!.FechaAntigua = nil + self.aplication.pedido!.agenciaAntigua = nil + self.aplication.pedido!.rowsOld = [] + self.refrescarCarrito() + self.showProgress(false) + self.navigationController!.viewControllers = [self.navigationController!.viewControllers[0], self.navigationController!.viewControllers[self.navigationController!.viewControllers.count - 1]] + _ = self.navigationController?.popViewController(animated: true) + }, + handlerRetry: { + self.showProgress(false) + self.updateOrder() + }, + handlerAccept: { + self.aplication.pedido!.rows = self.aplication.pedido!.rowsOld + self.aplication.pedido!.rowsOld = [] + self.showProgress(false) + _ = self.navigationController?.popViewController(animated: true) + } + ) + execute(cmd) + } +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewResumenPedido.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewResumenPedido.swift new file mode 100644 index 0000000..e50595e --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewResumenPedido.swift @@ -0,0 +1,169 @@ +// +// ViewResumenPedido.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 16/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewResumenPedido: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + @IBOutlet weak var labelClient: UILabel! + @IBOutlet weak var valueClient: UILabel! + @IBOutlet weak var labelAddress: UILabel! + @IBOutlet weak var valueAddress: UILabel! + @IBOutlet weak var labelDate: UILabel! + @IBOutlet weak var valueDate: UILabel! + @IBOutlet weak var labelAgency: UILabel! + @IBOutlet weak var valueAgency: UILabel! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + @IBOutlet weak var viewContenedor: UIView! + @IBOutlet weak var tablaResumen: UITableView! + + var resumen: OrderResumen? + var order: Order? + + var buttonOk : UIBarButtonItem! + + override func createView() { + super.createView() + buttonOk = self.navigationItem.rightBarButtonItem + self.navigationItem.rightBarButtonItem = nil + progress = progressBar + contenedor = viewContenedor + UtilsIos.registerNib(tablaResumen, cell: "CeldaCarrito") + self.tablaResumen.rowHeight = 58.0 + order = Order() + tablaResumen.backgroundColor = UIColor.groupTableViewBackground + tablaResumen.tableFooterView = UIView() + } + + override func setTitles() { + labelClient.text = NSLocalizedString("fragment_configurar_pedido_cliente", comment: "").uppercased() + labelAddress.text = NSLocalizedString("main_delivery_address", comment: "").uppercased() + labelDate.text = NSLocalizedString("main_arraival", comment: "").uppercased() + labelAgency.text = NSLocalizedString("main_agency", comment: "").uppercased() + self.title = NSLocalizedString("order_resume", comment: "") + } + + override func viewWillAppear(_ animated: Bool) { + ControllerPedido.reiniciarRecuperarPedido() + self.refrescarCarrito() + recuperarPedido() + + } + + + func recuperarPedido() + { + showProgress(true); + let cmd = CmdRecuperarPedido(o: resumen!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.order = cmd.order! + self.valueClient.text = self.order!.cliente?.Cliente! + self.valueAddress.text = self.order!.consignatarioActivo?.Domicilio + self.valueDate.text = UtilDate.getTextoFecha(UtilDate.stringToDate(self.order!.Fecha!)) + self.valueAgency.text = self.order?.agencia?.Agencia! + self.inicializado = true + self.tablaResumen.reloadData() + self.showProgress(false) + self.aplication.pedido!.recuperado = true + self.navigationItem.rightBarButtonItem = self.buttonOk + + }, + handlerRetry: { + self.showProgress(false) + self.recuperarPedido() + }, + handlerAccept: { + _ = self.navigationController?.popToRootViewController(animated: true) + } + ) + execute(cmd); + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + if order!.rows!.count == 0{ + if(inicializado) + { + tablaVacia(tablaResumen, text: NSLocalizedString("activity_validar_pedido_no_articulos", comment: "")) + } + return 0 + } else { + return (order!.rows!.count) + } + + } + + + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaCarrito") as! CeldaCarrito + let row = order?.rows![indexPath.row] + let total = (row?.amount?.doubleValue)! * (row?.tarifa?.price?.doubleValue)! + let title = "\(row!.articulo!.Article!) " + let subtitle = "\(row!.amount!)x \(UtilsNumbers.roundDouble(row!.tarifa!.price!, decimals: 2))€" + + celda.pintarCelda((row?.articulo?.foto)!, title: title, subtitle: subtitle, total: "\(UtilsNumbers.roundDouble(NSNumber(value: total), decimals: 2))€") + + return celda + } + + @IBAction func clickVerificar(_ sender: AnyObject) { + self.aplication.pedido = self.order! + //self.aplication.pedido!.cliente = self.aplication.cliente! + seleccionarPedido() + } + + + func seleccionarPedido() + { + showProgress(true) + if(UtilDate.stringToDate((aplication.pedido?.Fecha!)!).timeIntervalSince1970 < Calendar.current.startOfDay(for: Date()).timeIntervalSince1970) + { + aplication.pedido?.Fecha = UtilDate.dateToString(UtilDate.addDays(Date(), days: 1)) + } + + let cmd = CmdVerificarAgencia(consigna: aplication.pedido!.consignatarioActivo!.Id_Consigna!, agencia: aplication.pedido!.agencia!.Id_Agencia!, fecha: aplication.pedido!.Fecha!) + + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + if(!cmd.agenciaValida!) + { + self.aplication.pedido?.agencia = nil + } + self.showProgress(false) + self.launchSegue("reconfiguarPedido") + }, + handlerRetry: { + self.showProgress(false) + self.seleccionarPedido() + }, + handlerAccept: { + self.showProgress(false) + } + ) + execute(cmd) + + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier! == "reconfiguarPedido") + { + let viewResume = segue.destination as! ViewOrderResume + viewResume.mostrarAviso = true + self.aplication.pedido!.recuperado = true + } + } + + + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewSearch.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewSearch.swift new file mode 100644 index 0000000..d58e01b --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewSearch.swift @@ -0,0 +1,207 @@ +// +// ViewSearch.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 18/2/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewSearch: MyViewVentas, UITableViewDelegate, UISearchBarDelegate, UITableViewDataSource { + + @IBOutlet weak var search: UISearchBar! + @IBOutlet weak var tableData: UITableView! + @IBOutlet weak var navigation: UINavigationItem! + + let TIPO_CLIENTES = "TIPO_CLIENTES" + let TIPO_ARTICULOS = "TIPO_ARTICULOS" + + var clientes = Array() + var articulos = Array() + var tipo: String = "TIPO_ARTICULOS" + + override func createView() { + navigation.title = NSLocalizedString("navigation_panel_buscar_articulo", comment: "") + if(tipo == TIPO_CLIENTES) + { + UtilsIos.registerNib(tableData, cell: "CeldaString") + navigation.title = NSLocalizedString("navigation_panel_buscar_cliente", comment: "") + search.placeholder = NSLocalizedString("navigation_panel_buscar_cliente", comment: "") + } + else + { + tableData.rowHeight = 68.0 + UtilsIos.registerNib(tableData, cell: "CeldaImageTitle") + search.placeholder = NSLocalizedString("navigation_panel_buscar_articulo", comment: "") + } + createNavigation() + tableData.backgroundColor = UIColor.groupTableViewBackground + tableData.tableFooterView = UIView() + + } + + func dismissKeyboard() { + //Causes the view (or one of its embedded text fields) to resign the first responder status. + view.endEditing(true) + } + + override func viewWillAppear(_ animated: Bool) { + self.articulos = [] + self.search.text = "" + createNavigation() + search.becomeFirstResponder() + tableData.reloadData() + } + + func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { + + + if(tipo == TIPO_CLIENTES) + { + buscarClientes(searchText) + } + else + { + buscarArticulos(searchText) + } + + } + + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + if(tipo == TIPO_ARTICULOS) + { + return articulos.count + } + else + { + return clientes.count + } + } + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + if(tipo == TIPO_CLIENTES) + { + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaString") as! CeldaString + let row = clientes[indexPath.row] + + celda.pintarCelda("\(row.Id_Cliente!.intValue) \(row.Cliente!)", color: UIColor.white) + + return celda + } + else + { + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaImageTitle") as! CeldaImageTitle + let row = articulos[indexPath.row] + + celda.paintCell(row.foto!, lbl: row.Article!) + + return celda + } + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + if(tipo == TIPO_CLIENTES) + { + buscarClienteById(clientes[indexPath.row]) + } + else + { + launchSegue("segueBuscarArticulos", sender: articulos[indexPath.row]) + } + + } + + func buscarArticulos(_ articulo: String) + { + if(articulo != "") + { + ejecutador?.removeCommands() + let cmd = CmdBuscarArticulos(cadena: articulo, f: aplication.pedido!.Fecha!, consignatario: aplication.pedido!.consignatarioActivo!.Id_Consigna!, agencia: aplication.pedido!.agencia!.Id_Agencia!) + + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + if(cmd.articulos != nil) + { + self.articulos = cmd.articulos! + self.tableData.reloadData() + } + }, + handlerRetry: { + self.buscarArticulos(articulo) + }, + handlerAccept: {} + + ) + execute(cmd) + } + else{ + ejecutador!.removeCommands() + articulos = [] + tableData.reloadData() + } + } + + func buscarClientes(_ cliente: String) + { + if(cliente != "") + { + ejecutador?.removeCommands() + let cmd = CmdBuscarClientes(c: cliente) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.clientes = cmd.clientes + self.tableData.reloadData() + }, + handlerRetry: { + self.buscarClientes(cliente) + }, + handlerAccept: {} + ) + execute(cmd) + } + else{ + ejecutador!.removeCommands() + clientes = [] + tableData.reloadData() + } + } + + func buscarClienteById(_ cliente: ClienteVentas) + { + let cmd = CmdObtenerClienteById(c: cliente.Id_Cliente!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + ControllerPedido.cambiarCliente(cmd.cliente!) + _ = self.navigationController?.popViewController(animated: true) + }, + handlerRetry: { + self.buscarClienteById(cliente) + }, + handlerAccept: {} + ) + execute(cmd) + + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier == "segueBuscarArticulos") + { + let vc = segue.destination as! ViewDetalleArticulo + vc.articulo = sender as? ArticuloVentasTags + } + } + + func searchBarCancelButtonClicked(_ searchBar: UISearchBar) { + self.search.endEditing(true) + } + +} diff --git a/Verdnaturaventas/Verdnaturaventas/Views/ViewShippings.swift b/Verdnaturaventas/Verdnaturaventas/Views/ViewShippings.swift new file mode 100644 index 0000000..3266191 --- /dev/null +++ b/Verdnaturaventas/Verdnaturaventas/Views/ViewShippings.swift @@ -0,0 +1,116 @@ +// +// ViewShippings.swift +// Verdnaturaventas +// +// Created by Nelo Sanchez Gomiz on 4/3/16. +// Copyright © 2016 Nelo Sanchez Gomiz. All rights reserved. +// + +import UIKit +import BaseLibrary + +class ViewShippings: MyViewVentas, UITableViewDelegate, UITableViewDataSource { + + @IBOutlet weak var tablePedidos: UITableView! + @IBOutlet weak var progressBar: UIActivityIndicatorView! + + + var pedidos: Array = [] + + override func createView() { + super.createView() + progress = progressBar + contenedor = tablePedidos + UtilsIos.registerNib(tablePedidos, cell: "CeldaTicketRecibido") + self.tablePedidos.rowHeight = 65.0 + tablePedidos.backgroundColor = UIColor.groupTableViewBackground + tablePedidos.tableFooterView = UIView() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + if(pedidos.count == 0) + { + obtenerTickets() + } + } + + override func setTitles() { + self.title = NSLocalizedString("navigation_panel_shippings", comment: "") + } + + func obtenerTickets() + { + showProgress(true) + var cliente: ClienteVentas? = nil + if(aplication.pedido!.cliente != nil) + { + cliente = aplication.pedido!.cliente! + } + else + { + cliente = aplication.cliente! + } + + let cmd = CmdObtenerPedidos(cliente: cliente!.Id_Cliente!) + cmd.callbacks = CommandCallbacks( + handlerStart: {}, + handlerFinish: { + self.showProgress(false) + self.inicializado = true + if (cmd.orders!.count > 0) { + self.pedidos = cmd.orders! + } + self.tablePedidos.reloadData() + }, + handlerRetry: { + self.obtenerTickets() + }, + handlerAccept: { + self.showProgress(false) + self.inicializado = true + self.tablePedidos.reloadData() + } + ) + + execute(cmd); + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int + { + if pedidos.count == 0{ + if inicializado{ + tablaVacia(tablePedidos, text: NSLocalizedString("fragment_listado_pedidos_no_pedidos", comment: "")) + } + return 0 + } + else + { + return pedidos.count + } + } + + + internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ + + let celda = tableView.dequeueReusableCell(withIdentifier: "CeldaTicketRecibido") as! CeldaTicketRecibido + let row = pedidos[indexPath.row] + + celda.pintarCelda(agency: row.Agencia!, date: row.Fecha!, total: row.Total!) + + return celda + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + launchSegue("segueDetailsShippings", sender: pedidos[indexPath.row]) + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if(segue.identifier! == "segueDetailsShippings") + { + let vc = segue.destination as! ViewLineasPedido + vc.pedido = sender as? TicketRecepcion + } + } + +} diff --git a/Verdnaturaventas/VerdnaturaventasTests/Info.plist b/Verdnaturaventas/VerdnaturaventasTests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/Verdnaturaventas/VerdnaturaventasTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/Verdnaturaventas/VerdnaturaventasTests/VerdnaturaventasTests.swift b/Verdnaturaventas/VerdnaturaventasTests/VerdnaturaventasTests.swift new file mode 100644 index 0000000..0e2f221 --- /dev/null +++ b/Verdnaturaventas/VerdnaturaventasTests/VerdnaturaventasTests.swift @@ -0,0 +1,36 @@ +// +// VerdnaturaventasTests.swift +// VerdnaturaventasTests +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import XCTest +@testable import Verdnaturaventas + +class VerdnaturaventasTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Verdnaturaventas/VerdnaturaventasUITests/Info.plist b/Verdnaturaventas/VerdnaturaventasUITests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/Verdnaturaventas/VerdnaturaventasUITests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/Verdnaturaventas/VerdnaturaventasUITests/VerdnaturaventasUITests.swift b/Verdnaturaventas/VerdnaturaventasUITests/VerdnaturaventasUITests.swift new file mode 100644 index 0000000..40e2eff --- /dev/null +++ b/Verdnaturaventas/VerdnaturaventasUITests/VerdnaturaventasUITests.swift @@ -0,0 +1,36 @@ +// +// VerdnaturaventasUITests.swift +// VerdnaturaventasUITests +// +// Created by Nelo Sanchez Gomiz on 30/12/15. +// Copyright © 2015 Nelo Sanchez Gomiz. All rights reserved. +// + +import XCTest + +class VerdnaturaventasUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + //XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +}