From 1ccd1c9cff2583d790bc4bb93952451c3f9031b2 Mon Sep 17 00:00:00 2001 From: Piyushh Bhutoria Date: Sun, 3 Nov 2024 01:43:37 +0530 Subject: [PATCH] Update Expo and salary page to show previous month salary --- ios/Podfile.lock | 71 ++++++++++++++- ios/househelp.xcodeproj/project.pbxproj | 113 +++++++++++++----------- ios/househelp/Supporting/Expo.plist | 4 +- package-lock.json | 16 ++-- package.json | 10 +-- screens/SalaryScreen.tsx | 87 ++++++++++++++---- 6 files changed, 212 insertions(+), 89 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 81aa608..78d9430 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,9 +1,14 @@ PODS: - boost (1.83.0) - DoubleConversion (1.1.6) + - EASClient (0.12.0): + - ExpoModulesCore - EXConstants (16.0.2): - ExpoModulesCore - - Expo (51.0.37): + - EXJSONUtils (0.13.1) + - EXManifests (0.14.3): + - ExpoModulesCore + - Expo (51.0.38): - ExpoModulesCore - ExpoAsset (10.0.10): - ExpoModulesCore @@ -15,7 +20,7 @@ PODS: - ExpoModulesCore - ExpoKeepAwake (13.0.2): - ExpoModulesCore - - ExpoModulesCore (1.12.25): + - ExpoModulesCore (1.12.26): - DoubleConversion - glog - hermes-engine @@ -70,6 +75,37 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga + - EXStructuredHeaders (3.8.0) + - EXUpdates (0.25.27): + - DoubleConversion + - EASClient + - EXManifests + - ExpoModulesCore + - EXStructuredHeaders + - EXUpdatesInterface + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - ReachabilitySwift + - React-Codegen + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - "sqlite3 (~> 3.45.3+1)" + - Yoga + - EXUpdatesInterface (0.16.2): + - ExpoModulesCore - FBLazyVector (0.74.5) - fmt (9.1.0) - glog (0.3.5) @@ -98,6 +134,7 @@ PODS: - FBLazyVector (= 0.74.5) - RCTRequired (= 0.74.5) - React-Core (= 0.74.5) + - ReachabilitySwift (5.2.4) - React (0.74.5): - React-Core (= 0.74.5) - React-Core/DevSupport (= 0.74.5) @@ -1316,7 +1353,10 @@ PODS: DEPENDENCIES: - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) + - EASClient (from `../node_modules/expo-eas-client/ios`) - EXConstants (from `../node_modules/expo-constants/ios`) + - EXJSONUtils (from `../node_modules/expo-json-utils/ios`) + - EXManifests (from `../node_modules/expo-manifests/ios`) - Expo (from `../node_modules/expo`) - ExpoAsset (from `../node_modules/expo-asset/ios`) - ExpoFileSystem (from `../node_modules/expo-file-system/ios`) @@ -1328,6 +1368,9 @@ DEPENDENCIES: - ExpoSystemUI (from `../node_modules/expo-system-ui/ios`) - ExpoWebBrowser (from `../node_modules/expo-web-browser/ios`) - EXSplashScreen (from `../node_modules/expo-splash-screen/ios`) + - EXStructuredHeaders (from `../node_modules/expo-structured-headers/ios`) + - EXUpdates (from `../node_modules/expo-updates/ios`) + - EXUpdatesInterface (from `../node_modules/expo-updates-interface/ios`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) @@ -1390,6 +1433,7 @@ DEPENDENCIES: SPEC REPOS: trunk: + - ReachabilitySwift - SocketRocket - sqlite3 @@ -1398,8 +1442,14 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" + EASClient: + :path: "../node_modules/expo-eas-client/ios" EXConstants: :path: "../node_modules/expo-constants/ios" + EXJSONUtils: + :path: "../node_modules/expo-json-utils/ios" + EXManifests: + :path: "../node_modules/expo-manifests/ios" Expo: :path: "../node_modules/expo" ExpoAsset: @@ -1422,6 +1472,12 @@ EXTERNAL SOURCES: :path: "../node_modules/expo-web-browser/ios" EXSplashScreen: :path: "../node_modules/expo-splash-screen/ios" + EXStructuredHeaders: + :path: "../node_modules/expo-structured-headers/ios" + EXUpdates: + :path: "../node_modules/expo-updates/ios" + EXUpdatesInterface: + :path: "../node_modules/expo-updates-interface/ios" FBLazyVector: :path: "../node_modules/react-native/Libraries/FBLazyVector" fmt: @@ -1541,18 +1597,24 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: d3f49c53809116a5d38da093a8aa78bf551aed09 DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 + EASClient: 1509a9a6b48b932ec61667644634daf2562983b8 EXConstants: 409690fbfd5afea964e5e9d6c4eb2c2b59222c59 - Expo: 67b60b3b80a3c8e9f3bcaaa84d06d140229a246d + EXJSONUtils: 30c17fd9cc364d722c0946a550dfbf1be92ef6a4 + EXManifests: c1fab4c3237675e7b0299ea8df0bcb14baca4f42 + Expo: 9b6666ef2fedcfc89c5b9be2aa1ce12b81f9e7f5 ExpoAsset: 323700f291684f110fb55f0d4022a3362ea9f875 ExpoFileSystem: 80bfe850b1f9922c16905822ecbf97acd711dc51 ExpoFont: 00756e6c796d8f7ee8d211e29c8b619e75cbf238 ExpoHead: fcb28a68ed4ba28f177394d2dfb8a0a8824cd103 ExpoKeepAwake: 3b8815d9dd1d419ee474df004021c69fdd316d08 - ExpoModulesCore: 0e7d4d5c13169bbbd53496721d811adbcc5d600a + ExpoModulesCore: 831ece8311a489418746925820bbffdda587d6f4 ExpoSQLite: 80476d564ec75b26ffe801f3953d876377b3c9fe ExpoSystemUI: d4f065a016cae6721b324eb659cdee4d4cf0cb26 ExpoWebBrowser: 7595ccac6938eb65b076385fd23d035db9ecdc8e EXSplashScreen: 17a656c08a0095be15b620c52e61dfdb665863d2 + EXStructuredHeaders: cb8d1f698e144f4c5547b4c4963e1552f5d2b457 + EXUpdates: a1c1a6fd9f36b8cd91033e639640522e54706994 + EXUpdatesInterface: 996527fd7d1a5d271eb523258d603f8f92038f24 FBLazyVector: ac12dc084d1c8ec4cc4d7b3cf1b0ebda6dab85af fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f @@ -1561,6 +1623,7 @@ SPEC CHECKSUMS: RCTDeprecation: 3afceddffa65aee666dafd6f0116f1d975db1584 RCTRequired: ec1239bc9d8bf63e10fb92bd8b26171a9258e0c1 RCTTypeSafety: f5ecbc86c5c5fa163c05acb7a1c5012e15b5f994 + ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda React: fc9fa7258eff606f44d58c5b233a82dc9cf09018 React-callinvoker: e3fab14d69607fb7e8e3a57e5a415aed863d3599 React-Codegen: 6fa87b7c6b8efcd0cef4bfeaec8c8bc8a6abe75a diff --git a/ios/househelp.xcodeproj/project.pbxproj b/ios/househelp.xcodeproj/project.pbxproj index 39c549b..f04cd4e 100644 --- a/ios/househelp.xcodeproj/project.pbxproj +++ b/ios/househelp.xcodeproj/project.pbxproj @@ -3,19 +3,19 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 3B79CD41FF6049C29B9624F9 /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F37B22D27A444658D3D7545 /* noop-file.swift */; }; + 226711BC22A837B7B1DCB6D8 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = A698243A34B5922AEA271D3A /* PrivacyInfo.xcprivacy */; }; 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; 96905EF65AED1B983A6B3ABC /* libPods-househelp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-househelp.a */; }; B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; }; BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; }; - F2D0B443FB5672B7E0B7BC04 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 4D9DCB1CC5F5CFA372BAECAB /* PrivacyInfo.xcprivacy */; }; + FF411C5B58534A549174C56F /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC61985AD03B49689009C6E7 /* noop-file.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -25,14 +25,14 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = househelp/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = househelp/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = househelp/main.m; sourceTree = ""; }; - 3F37B22D27A444658D3D7545 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "househelp/noop-file.swift"; sourceTree = ""; }; - 4D9DCB1CC5F5CFA372BAECAB /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = househelp/PrivacyInfo.xcprivacy; sourceTree = ""; }; 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-househelp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-househelp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6C2E3173556A471DD304B334 /* Pods-househelp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-househelp.debug.xcconfig"; path = "Target Support Files/Pods-househelp/Pods-househelp.debug.xcconfig"; sourceTree = ""; }; 7A4D352CD337FB3A3BF06240 /* Pods-househelp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-househelp.release.xcconfig"; path = "Target Support Files/Pods-househelp/Pods-househelp.release.xcconfig"; sourceTree = ""; }; + 93680879AEE64F4D96C98B49 /* househelp-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "househelp-Bridging-Header.h"; path = "househelp/househelp-Bridging-Header.h"; sourceTree = ""; }; + A698243A34B5922AEA271D3A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = househelp/PrivacyInfo.xcprivacy; sourceTree = ""; }; AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = househelp/SplashScreen.storyboard; sourceTree = ""; }; BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = ""; }; - BEBA09A6972943E4ABA5C7D9 /* househelp-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "househelp-Bridging-Header.h"; path = "househelp/househelp-Bridging-Header.h"; sourceTree = ""; }; + DC61985AD03B49689009C6E7 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "househelp/noop-file.swift"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-househelp/ExpoModulesProvider.swift"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -59,9 +59,9 @@ 13B07FB61A68108700A75B9A /* Info.plist */, 13B07FB71A68108700A75B9A /* main.m */, AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */, - 3F37B22D27A444658D3D7545 /* noop-file.swift */, - BEBA09A6972943E4ABA5C7D9 /* househelp-Bridging-Header.h */, - 4D9DCB1CC5F5CFA372BAECAB /* PrivacyInfo.xcprivacy */, + DC61985AD03B49689009C6E7 /* noop-file.swift */, + 93680879AEE64F4D96C98B49 /* househelp-Bridging-Header.h */, + A698243A34B5922AEA271D3A /* PrivacyInfo.xcprivacy */, ); name = househelp; sourceTree = ""; @@ -147,13 +147,13 @@ buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "househelp" */; buildPhases = ( 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */, - FDE157DEE18A266AF18B3356 /* [Expo] Configure project */, + FA819417E0D4B15E3D513172 /* [Expo] Configure project */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */, - B69E5375DD291E63C8B150B5 /* [CP] Embed Pods Frameworks */, + 7FFF3E3F7080D0A5061D5F35 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -170,12 +170,11 @@ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 1130; TargetAttributes = { 13B07F861A680F5B00A75B9A = { LastSwiftMigration = 1250; - DevelopmentTeam = "3YQZ2TJCPG"; - ProvisioningStyle = Automatic; }; }; }; @@ -205,7 +204,7 @@ BB2F792D24A3F905000567C9 /* Expo.plist in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */, - F2D0B443FB5672B7E0B7BC04 /* PrivacyInfo.xcprivacy in Resources */, + 226711BC22A837B7B1DCB6D8 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -249,6 +248,26 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 7FFF3E3F7080D0A5061D5F35 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-househelp/Pods-househelp-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/ExpoSQLite/crsqlite.framework/crsqlite", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/crsqlite.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-househelp/Pods-househelp-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -258,16 +277,20 @@ "${PODS_ROOT}/Target Support Files/Pods-househelp/Pods-househelp-resources.sh", "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/EXUpdates/EXUpdates.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/ExpoSystemUI/ExpoSystemUI_privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/ReachabilitySwift.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXUpdates.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoSystemUI_privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ReachabilitySwift.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle", ); runOnlyForDeploymentPostprocessing = 0; @@ -275,27 +298,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-househelp/Pods-househelp-resources.sh\"\n"; showEnvVarsInLog = 0; }; - B69E5375DD291E63C8B150B5 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-househelp/Pods-househelp-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/ExpoSQLite/crsqlite.framework/crsqlite", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/crsqlite.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-househelp/Pods-househelp-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - FDE157DEE18A266AF18B3356 /* [Expo] Configure project */ = { + FA819417E0D4B15E3D513172 /* [Expo] Configure project */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -324,7 +327,7 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */, - 3B79CD41FF6049C29B9624F9 /* noop-file.swift in Sources */, + FF411C5B58534A549174C56F /* noop-file.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -339,6 +342,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = househelp/househelp.entitlements; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 3YQZ2TJCPG; ENABLE_BITCODE = NO; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", @@ -346,7 +350,10 @@ ); INFOPLIST_FILE = househelp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MARKETING_VERSION = 1.0; OTHER_LDFLAGS = ( "$(inherited)", @@ -361,9 +368,6 @@ SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; - DEVELOPMENT_TEAM = "3YQZ2TJCPG"; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; }; name = Debug; }; @@ -375,9 +379,13 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = househelp/househelp.entitlements; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 3YQZ2TJCPG; INFOPLIST_FILE = househelp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MARKETING_VERSION = 1.0; OTHER_LDFLAGS = ( "$(inherited)", @@ -391,9 +399,6 @@ SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; - DEVELOPMENT_TEAM = "3YQZ2TJCPG"; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; }; name = Release; }; @@ -449,14 +454,14 @@ IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); + OTHER_LDFLAGS = "$(inherited) "; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; @@ -508,13 +513,13 @@ IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; - LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ( + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, "$(inherited)", - " ", ); + LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = "$(inherited) "; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; diff --git a/ios/househelp/Supporting/Expo.plist b/ios/househelp/Supporting/Expo.plist index 701ae60..bf08064 100644 --- a/ios/househelp/Supporting/Expo.plist +++ b/ios/househelp/Supporting/Expo.plist @@ -8,9 +8,9 @@ EXUpdatesLaunchWaitMs 0 - EXUpdatesURL - https://u.expo.dev/2d2d2595-c8bd-438f-8bbf-1889c5555e1b EXUpdatesRuntimeVersion 1.0.0 + EXUpdatesURL + https://u.expo.dev/2d2d2595-c8bd-438f-8bbf-1889c5555e1b \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 409a9cc..22c18ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@expo/vector-icons": "^14.0.2", "@react-native-community/datetimepicker": "8.0.1", "@react-navigation/native": "^6.0.2", - "expo": "~51.0.28", + "expo": "^51.0.38", "expo-constants": "~16.0.2", "expo-font": "~12.0.9", "expo-linking": "~6.3.1", @@ -9475,9 +9475,9 @@ } }, "node_modules/expo": { - "version": "51.0.37", - "resolved": "https://registry.npmjs.org/expo/-/expo-51.0.37.tgz", - "integrity": "sha512-zMdfTiGNgNWG0HOOFA3zRreS94iQ7fDxxgEIR6wdQCbncTpbeYj+5mscTAlHE9JJ+oBkcNyJXrLSjE/YVbFERg==", + "version": "51.0.38", + "resolved": "https://registry.npmjs.org/expo/-/expo-51.0.38.tgz", + "integrity": "sha512-/B9npFkOPmv6WMIhdjQXEY0Z9k/67UZIVkodW8JxGIXwKUZAGHL+z1R5hTtWimpIrvVhyHUFU3f8uhfEKYhHNQ==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.0", @@ -9492,7 +9492,7 @@ "expo-font": "~12.0.10", "expo-keep-awake": "~13.0.2", "expo-modules-autolinking": "1.11.3", - "expo-modules-core": "1.12.25", + "expo-modules-core": "1.12.26", "fbemitter": "^3.0.0", "whatwg-url-without-unicode": "8.0.0-3" }, @@ -9717,9 +9717,9 @@ } }, "node_modules/expo-modules-core": { - "version": "1.12.25", - "resolved": "https://registry.npmjs.org/expo-modules-core/-/expo-modules-core-1.12.25.tgz", - "integrity": "sha512-HB2LS2LEM41Xq1bG+Jtzqm6XgPaa+mM9BAvCdX1lDGMQ9Ay9vMTL/GVEs2gpsINPofICopjBRwD+wftyCbVrzg==", + "version": "1.12.26", + "resolved": "https://registry.npmjs.org/expo-modules-core/-/expo-modules-core-1.12.26.tgz", + "integrity": "sha512-y8yDWjOi+rQRdO+HY+LnUlz8qzHerUaw/LUjKPU/mX8PRXP4UUPEEp5fjAwBU44xjNmYSHWZDwet4IBBE+yQUA==", "license": "MIT", "dependencies": { "invariant": "^2.2.4" diff --git a/package.json b/package.json index b9c5966..3627433 100644 --- a/package.json +++ b/package.json @@ -16,15 +16,18 @@ }, "dependencies": { "@expo/vector-icons": "^14.0.2", + "@react-native-community/datetimepicker": "8.0.1", "@react-navigation/native": "^6.0.2", - "expo": "~51.0.28", + "expo": "^51.0.38", "expo-constants": "~16.0.2", "expo-font": "~12.0.9", "expo-linking": "~6.3.1", "expo-router": "~3.5.23", "expo-splash-screen": "~0.27.5", + "expo-sqlite": "~14.0.6", "expo-status-bar": "~1.12.1", "expo-system-ui": "~3.0.7", + "expo-updates": "~0.25.27", "expo-web-browser": "~13.0.3", "react": "18.2.0", "react-dom": "18.2.0", @@ -34,10 +37,7 @@ "react-native-reanimated": "~3.10.1", "react-native-safe-area-context": "4.10.5", "react-native-screens": "3.31.1", - "react-native-web": "~0.19.10", - "expo-sqlite": "~14.0.6", - "@react-native-community/datetimepicker": "8.0.1", - "expo-updates": "~0.25.27" + "react-native-web": "~0.19.10" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/screens/SalaryScreen.tsx b/screens/SalaryScreen.tsx index 4235dc0..f914acf 100644 --- a/screens/SalaryScreen.tsx +++ b/screens/SalaryScreen.tsx @@ -1,17 +1,16 @@ import React, { useState, useEffect } from 'react'; -import { StyleSheet, FlatList, View } from 'react-native'; +import { StyleSheet, FlatList, TouchableOpacity, View } from 'react-native'; import { ThemedView } from '@/components/ThemedView'; import { ThemedText } from '@/components/ThemedText'; import { SafeAreaWrapper } from '@/components/SafeAreaWrapper'; -import { useHouseHelp, HouseHelp } from '@/contexts/HouseHelpContext'; +import { useHouseHelp } from '@/contexts/HouseHelpContext'; import { useAttendance } from '@/contexts/AttendanceContext'; import { usePayment } from '@/contexts/PaymentContext'; import { useTheme } from '@react-navigation/native'; - +import { Ionicons } from '@expo/vector-icons'; interface SalaryInfo { totalSalary: number; } - interface TotalSalaryInfo { baseSalary: number; holidayPay: number; @@ -25,22 +24,47 @@ const SalaryScreen: React.FC = () => { const { houseHelps } = useHouseHelp(); const { calculateSalary } = useAttendance(); const { getPaymentsForHouseHelp } = usePayment(); - - const [currentMonth, setCurrentMonth] = useState(''); + const theme = useTheme(); + + const [selectedDate, setSelectedDate] = useState(new Date()); const [startDate, setStartDate] = useState(''); const [endDate, setEndDate] = useState(''); - useEffect(() => { - const now = new Date(); - const year = now.getFullYear(); - const month = now.getMonth() + 1; + const updateDates = (date: Date) => { + const year = date.getFullYear(); + const month = date.getMonth() + 1; const monthString = month.toString().padStart(2, '0'); - setCurrentMonth(`${year}-${monthString}`); + const lastDay = new Date(year, month, 0).getDate(); + setStartDate(`${year}-${monthString}-01`); - setEndDate(`${year}-${monthString}-${new Date(year, month, 0).getDate()}`); - }, []); + setEndDate(`${year}-${monthString}-${lastDay}`); + }; + + useEffect(() => { + updateDates(selectedDate); + }, [selectedDate]); + + const goToPreviousMonth = () => { + const newDate = new Date(selectedDate); + newDate.setMonth(newDate.getMonth() - 1); + setSelectedDate(newDate); + }; - const calculateTotalSalary = (houseHelp: HouseHelp, salaryInfo: SalaryInfo): TotalSalaryInfo => { + const goToNextMonth = () => { + const newDate = new Date(selectedDate); + newDate.setMonth(newDate.getMonth() + 1); + const currentDate = new Date(); + if (newDate <= currentDate) { + setSelectedDate(newDate); + } + }; + + const formatMonthYear = (date: Date) => { + return date.toLocaleString('default', { month: 'long', year: 'numeric' }); + }; + + const calculateTotalSalary = (houseHelp: HouseHelp, salaryInfo: SalaryInfo): + TotalSalaryInfo => { const payments = getPaymentsForHouseHelp(houseHelp.id, startDate, endDate); const baseSalary = salaryInfo.totalSalary; @@ -92,7 +116,31 @@ const SalaryScreen: React.FC = () => { Salary Information - {currentMonth} + + + + + + + + {formatMonthYear(selectedDate)} + + + + + + + item.id} @@ -116,9 +164,16 @@ const styles = StyleSheet.create({ title: { marginBottom: 8, }, - subtitle: { + monthSelector: { + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + paddingVertical: 16, marginBottom: 16, }, + monthText: { + textAlign: 'center', + }, salaryItem: { padding: 16, borderRadius: 8,