Compare commits
17 Commits
loaddata/3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 60e5c0663c | |||
| ae0bf4dd60 | |||
| bb63f7fa9a | |||
| 9742c1849a | |||
| 2265ef64cc | |||
| fbd096af9c | |||
| 5019b00f59 | |||
| 249ada221b | |||
| 19814315a4 | |||
| 77ef3a055e | |||
| aba3ad8ded | |||
| 7799c7720d | |||
| 2926b6eac1 | |||
| 637d444c5c | |||
| a614cfaac9 | |||
| 1a7ad58505 | |||
| 7612be7366 |
179
QWEN.md
179
QWEN.md
@@ -1,179 +0,0 @@
|
|||||||
# HIPMI Mobile Application - Development Guide
|
|
||||||
|
|
||||||
## Project Overview
|
|
||||||
|
|
||||||
HIPMI Badung Connect is a mobile application built with Expo and React Native. It serves as a connection platform for HIPMI (Himpunan Pengusaha Muda Indonesia) Badung members, featuring authentication, user management, and various business-related functionalities.
|
|
||||||
|
|
||||||
### Key Technologies
|
|
||||||
- **Framework**: Expo (v54.0.0) with React Native (0.81.4)
|
|
||||||
- **Architecture**: File-based routing with Expo Router
|
|
||||||
- **State Management**: React Context API
|
|
||||||
- **Styling**: React Native components with custom color palettes
|
|
||||||
- **Authentication**: Token-based authentication with OTP verification
|
|
||||||
- **Database**: AsyncStorage for local storage
|
|
||||||
- **Maps**: React Native Maps and Mapbox integration
|
|
||||||
- **Notifications**: Expo Notifications and Firebase Messaging
|
|
||||||
- **Language**: TypeScript
|
|
||||||
|
|
||||||
### Project Structure
|
|
||||||
```
|
|
||||||
hipmi-mobile/
|
|
||||||
├── app/ # File-based routing structure
|
|
||||||
│ ├── (application)/ # Main application screens
|
|
||||||
│ │ ├── (file)/ # File management screens
|
|
||||||
│ │ ├── (image)/ # Image management screens
|
|
||||||
│ │ ├── (user)/ # User-specific screens
|
|
||||||
│ │ └── admin/ # Admin-specific screens
|
|
||||||
│ ├── _layout.tsx # Root layout wrapper
|
|
||||||
│ ├── index.tsx # Home screen
|
|
||||||
│ ├── eula.tsx # Terms and conditions screen
|
|
||||||
│ ├── register.tsx # Registration screen
|
|
||||||
│ └── verification.tsx # OTP verification screen
|
|
||||||
├── assets/ # Static assets (images, icons)
|
|
||||||
├── components/ # Reusable UI components
|
|
||||||
├── constants/ # Configuration constants
|
|
||||||
├── context/ # React Context providers
|
|
||||||
├── hooks/ # Custom React hooks
|
|
||||||
├── screens/ # Screen components
|
|
||||||
├── service/ # API services and configurations
|
|
||||||
├── types/ # TypeScript type definitions
|
|
||||||
├── app.config.js # Expo configuration
|
|
||||||
├── package.json # Dependencies and scripts
|
|
||||||
└── ...
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building and Running
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
- Node.js (with bun >=1.0.0 as specified in package.json)
|
|
||||||
- Expo CLI or bun installed globally
|
|
||||||
|
|
||||||
### Setup Instructions
|
|
||||||
1. **Install dependencies**:
|
|
||||||
```bash
|
|
||||||
bun install
|
|
||||||
# or if using npm
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Environment Variables**:
|
|
||||||
Create a `.env` file with the following variables:
|
|
||||||
```
|
|
||||||
API_BASE_URL=your_api_base_url
|
|
||||||
BASE_URL=your_base_url
|
|
||||||
DEEP_LINK_URL=your_deep_link_url
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Start the development server**:
|
|
||||||
```bash
|
|
||||||
# Using bun (as specified in package.json)
|
|
||||||
bun run start
|
|
||||||
# or using expo directly
|
|
||||||
npx expo start
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Platform-specific commands**:
|
|
||||||
```bash
|
|
||||||
# Android
|
|
||||||
bun run android
|
|
||||||
# iOS
|
|
||||||
bun run ios
|
|
||||||
# Web
|
|
||||||
bun run web
|
|
||||||
```
|
|
||||||
|
|
||||||
### EAS Build Configuration
|
|
||||||
The project uses Expo Application Services (EAS) for building and deployment:
|
|
||||||
- Development builds: `eas build --profile development`
|
|
||||||
- Preview builds: `eas build --profile preview`
|
|
||||||
- Production builds: `eas build --profile production`
|
|
||||||
|
|
||||||
## Authentication Flow
|
|
||||||
|
|
||||||
The application implements a phone number-based authentication system with OTP verification:
|
|
||||||
|
|
||||||
1. **Login**: User enters phone number → OTP sent via SMS
|
|
||||||
2. **Verification**: User enters OTP code → Validates and creates session
|
|
||||||
3. **Registration**: If user doesn't exist, registration flow is triggered
|
|
||||||
4. **Terms Agreement**: User must accept terms and conditions
|
|
||||||
5. **Session Management**: Tokens stored in AsyncStorage
|
|
||||||
|
|
||||||
### Key Authentication Functions
|
|
||||||
- `loginWithNomor()`: Initiates OTP sending
|
|
||||||
- `validateOtp()`: Verifies OTP and creates session
|
|
||||||
- `registerUser()`: Registers new users
|
|
||||||
- `logout()`: Clears session and removes tokens
|
|
||||||
- `acceptedTerms()`: Handles terms acceptance
|
|
||||||
|
|
||||||
## Key Features
|
|
||||||
|
|
||||||
### User Management
|
|
||||||
- Phone number-based registration and login
|
|
||||||
- OTP verification system
|
|
||||||
- Terms and conditions agreement
|
|
||||||
- User profile management
|
|
||||||
|
|
||||||
### Business Features
|
|
||||||
- Business field management (admin section)
|
|
||||||
- File and image management capabilities
|
|
||||||
- Location services integration
|
|
||||||
- Push notifications
|
|
||||||
|
|
||||||
### UI Components
|
|
||||||
- Custom color palette with blue/yellow theme
|
|
||||||
- Responsive layouts using SafeAreaView
|
|
||||||
- Toast notifications for user feedback
|
|
||||||
- Bottom tab navigation and drawer navigation
|
|
||||||
|
|
||||||
## Development Conventions
|
|
||||||
|
|
||||||
### Naming Conventions
|
|
||||||
- Components: PascalCase (e.g., `UserProfile.tsx`)
|
|
||||||
- Functions: camelCase (e.g., `getUserData()`)
|
|
||||||
- Constants: UPPER_SNAKE_CASE (e.g., `API_BASE_URL`)
|
|
||||||
- Files: kebab-case or camelCase for utility files
|
|
||||||
|
|
||||||
### Code Organization
|
|
||||||
- Components are organized by feature/functionality
|
|
||||||
- API services are centralized in the `service/` directory
|
|
||||||
- Type definitions are maintained in the `types/` directory
|
|
||||||
- Constants are grouped by category in the `constants/` directory
|
|
||||||
|
|
||||||
### Styling Approach
|
|
||||||
- Color palette defined in `constants/color-palet.ts`
|
|
||||||
- Reusable styles and themes centralized
|
|
||||||
- Responsive design using React Native's flexbox system
|
|
||||||
|
|
||||||
### Testing
|
|
||||||
- Linting: `bun run lint` (uses ESLint with Expo config)
|
|
||||||
- No specific test framework mentioned in package.json
|
|
||||||
|
|
||||||
## Environment Configuration
|
|
||||||
|
|
||||||
The application supports multiple environments through:
|
|
||||||
- Environment variables loaded via dotenv
|
|
||||||
- Expo's extra configuration in `app.config.js`
|
|
||||||
- Platform-specific configurations for iOS and Android
|
|
||||||
|
|
||||||
### Supported Platforms
|
|
||||||
- iOS (with tablet support)
|
|
||||||
- Android (with adaptive icons)
|
|
||||||
- Web (static output)
|
|
||||||
|
|
||||||
## Third-party Integrations
|
|
||||||
|
|
||||||
- **Firebase**: Authentication, messaging, and analytics
|
|
||||||
- **Mapbox**: Advanced mapping capabilities
|
|
||||||
- **React Navigation**: Screen navigation and routing
|
|
||||||
- **React Native Paper**: Material Design components
|
|
||||||
- **Axios**: HTTP client for API requests
|
|
||||||
- **Lodash**: Utility functions
|
|
||||||
- **QR Code SVG**: QR code generation
|
|
||||||
|
|
||||||
## Important Configuration Files
|
|
||||||
|
|
||||||
- `app.config.js`: Expo configuration, app metadata, and plugin setup
|
|
||||||
- `eas.json`: EAS build profiles and submission configuration
|
|
||||||
- `tsconfig.json`: TypeScript compiler options
|
|
||||||
- `package.json`: Dependencies, scripts, and project metadata
|
|
||||||
- `metro.config.js`: Metro bundler configuration
|
|
||||||
@@ -100,7 +100,7 @@ packagingOptions {
|
|||||||
applicationId 'com.bip.hipmimobileapp'
|
applicationId 'com.bip.hipmimobileapp'
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 4
|
versionCode 3
|
||||||
versionName "1.0.1"
|
versionName "1.0.1"
|
||||||
|
|
||||||
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
|
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
<data android:scheme="https"/>
|
<data android:scheme="https"/>
|
||||||
</intent>
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true" android:enableOnBackInvokedCallback="false" android:fullBackupContent="@xml/secure_store_backup_rules" android:dataExtractionRules="@xml/secure_store_data_extraction_rules">
|
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true" android:enableOnBackInvokedCallback="false">
|
||||||
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/notification_icon_color" tools:replace="android:resource"/>
|
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/notification_icon_color"/>
|
||||||
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon"/>
|
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon"/>
|
||||||
<meta-data android:name="expo.modules.notifications.default_notification_color" android:resource="@color/notification_icon_color"/>
|
<meta-data android:name="expo.modules.notifications.default_notification_color" android:resource="@color/notification_icon_color"/>
|
||||||
<meta-data android:name="expo.modules.notifications.default_notification_icon" android:resource="@drawable/notification_icon"/>
|
<meta-data android:name="expo.modules.notifications.default_notification_icon" android:resource="@drawable/notification_icon"/>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<full-backup-content>
|
|
||||||
<exclude domain="sharedpref" path="SECURESTORE"/>
|
|
||||||
</full-backup-content>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<data-extraction-rules>
|
|
||||||
<cloud-backup>
|
|
||||||
<exclude domain="sharedpref" path="SECURESTORE"/>
|
|
||||||
</cloud-backup>
|
|
||||||
<device-transfer>
|
|
||||||
<exclude domain="sharedpref" path="SECURESTORE"/>
|
|
||||||
</device-transfer>
|
|
||||||
</data-extraction-rules>
|
|
||||||
@@ -21,7 +21,7 @@ export default {
|
|||||||
"Aplikasi membutuhkan akses lokasi untuk menampilkan peta.",
|
"Aplikasi membutuhkan akses lokasi untuk menampilkan peta.",
|
||||||
},
|
},
|
||||||
associatedDomains: ["applinks:cld-dkr-staging-hipmi.wibudev.com"],
|
associatedDomains: ["applinks:cld-dkr-staging-hipmi.wibudev.com"],
|
||||||
buildNumber: "20",
|
buildNumber: "15",
|
||||||
},
|
},
|
||||||
|
|
||||||
android: {
|
android: {
|
||||||
@@ -32,7 +32,7 @@ export default {
|
|||||||
},
|
},
|
||||||
edgeToEdgeEnabled: true,
|
edgeToEdgeEnabled: true,
|
||||||
package: "com.bip.hipmimobileapp",
|
package: "com.bip.hipmimobileapp",
|
||||||
versionCode: 4,
|
versionCode: 3,
|
||||||
// softwareKeyboardLayoutMode: 'resize', // option: untuk mengatur keyboard pada room chst collaboration
|
// softwareKeyboardLayoutMode: 'resize', // option: untuk mengatur keyboard pada room chst collaboration
|
||||||
intentFilters: [
|
intentFilters: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import { CenterCustom, TextCustom, ViewWrapper } from "@/components";
|
import { CenterCustom, TextCustom, ViewWrapper } from "@/components";
|
||||||
import API_STRORAGE from "@/constants/base-url-api-strorage";
|
import API_STRORAGE from "@/constants/base-url-api-strorage";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
|
||||||
import { Image } from "expo-image";
|
import { Image } from "expo-image";
|
||||||
import { useLocalSearchParams } from "expo-router";
|
import { useLocalSearchParams } from "expo-router";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { View } from "react-native";
|
|
||||||
|
|
||||||
export default function PreviewImage() {
|
export default function PreviewImage() {
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
@@ -13,48 +11,18 @@ export default function PreviewImage() {
|
|||||||
return (
|
return (
|
||||||
<ViewWrapper>
|
<ViewWrapper>
|
||||||
{id ? (
|
{id ? (
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
width: "100%",
|
|
||||||
height: "100%",
|
|
||||||
position: "relative",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{/* Main Image */}
|
|
||||||
<Image
|
<Image
|
||||||
onLoad={() => {
|
onLoad={() => {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}}
|
}}
|
||||||
source={API_STRORAGE.GET({ fileId: id as string })}
|
source={
|
||||||
|
isLoading
|
||||||
|
? require("@/assets/images/loading.gif")
|
||||||
|
: API_STRORAGE.GET({ fileId: id as string })
|
||||||
|
}
|
||||||
contentFit="contain"
|
contentFit="contain"
|
||||||
style={{ width: "100%", height: "100%" }}
|
style={{ width: "100%", height: "100%" }}
|
||||||
// placeholder={require("@/assets/images/loading.gif")}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Custom Loader Overlay */}
|
|
||||||
{isLoading && (
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
position: "absolute",
|
|
||||||
top: 0,
|
|
||||||
left: 0,
|
|
||||||
right: 0,
|
|
||||||
bottom: 0,
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
backgroundColor: MainColor.darkblue,
|
|
||||||
zIndex: 1,
|
|
||||||
opacity: 0.5,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Image
|
|
||||||
source={require("@/assets/images/loading.gif")}
|
|
||||||
contentFit="contain"
|
|
||||||
style={{ width: 60, height: 60 }}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</View>
|
|
||||||
) : (
|
) : (
|
||||||
<CenterCustom>
|
<CenterCustom>
|
||||||
<TextCustom>File not found</TextCustom>
|
<TextCustom>File not found</TextCustom>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { BackButton } from "@/components";
|
import { BackButton } from "@/components";
|
||||||
import { IconPlus } from "@/components/_Icon";
|
|
||||||
import { IconDot } from "@/components/_Icon/IconComponent";
|
|
||||||
import LeftButtonCustom from "@/components/Button/BackButton";
|
import LeftButtonCustom from "@/components/Button/BackButton";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
||||||
@@ -53,35 +51,24 @@ export default function UserLayout() {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* ========== Notification Section ========= */}
|
{/* ========== Notification Section ========= */}
|
||||||
|
<Stack.Screen
|
||||||
{/* DIPINDAH DI FILE NOTIFICATION USER */}
|
|
||||||
{/* <Stack.Screen
|
|
||||||
name="notifications/index"
|
name="notifications/index"
|
||||||
options={{
|
options={{
|
||||||
title: "Notifikasi",
|
title: "Notifikasi",
|
||||||
headerLeft: () => <BackButton />,
|
headerLeft: () => <BackButton />,
|
||||||
// headerRight: () => (
|
|
||||||
// <IconPlus
|
|
||||||
// color={MainColor.yellow}
|
|
||||||
// onPress={() => router.push("/test-notifications")}
|
|
||||||
// />
|
|
||||||
// ),
|
|
||||||
}}
|
}}
|
||||||
/> */}
|
/>
|
||||||
|
|
||||||
{/* ========== Event Section ========= */}
|
{/* ========== Event Section ========= */}
|
||||||
|
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="event/(tabs)"
|
name="event/(tabs)"
|
||||||
options={{
|
options={{
|
||||||
title: "Event",
|
title: "Event",
|
||||||
// NOTE: DIPINDAH DI FILE /Event/(Tabs)/_layout.tsx
|
headerLeft: () => (
|
||||||
// headerLeft: () => (
|
<LeftButtonCustom path="/(application)/(user)/home" />
|
||||||
// <LeftButtonCustom path="/(application)/(user)/home" />
|
),
|
||||||
// ),
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="event/create"
|
name="event/create"
|
||||||
options={{
|
options={{
|
||||||
@@ -524,8 +511,7 @@ export default function UserLayout() {
|
|||||||
name="job/(tabs)"
|
name="job/(tabs)"
|
||||||
options={{
|
options={{
|
||||||
title: "Job Vacancy",
|
title: "Job Vacancy",
|
||||||
// headerLeft: () => <BackButton path="/home" />,
|
headerLeft: () => <BackButton path="/home" />,
|
||||||
// NOTE: headerLeft di pindahkan ke Tabs Layout
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
@@ -616,20 +602,6 @@ export default function UserLayout() {
|
|||||||
headerLeft: () => <BackButton />,
|
headerLeft: () => <BackButton />,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
|
||||||
name="forum/[id]/preview-report-posting"
|
|
||||||
options={{
|
|
||||||
title: "Laporan Postingan",
|
|
||||||
headerLeft: () => <BackButton />,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Stack.Screen
|
|
||||||
name="forum/[id]/preview-report-comment"
|
|
||||||
options={{
|
|
||||||
title: "Laporan Komentar",
|
|
||||||
headerLeft: () => <BackButton />,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{/* ========== Maps Section ========= */}
|
{/* ========== Maps Section ========= */}
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export default function DonationBeranda() {
|
|||||||
const response = await apiDonationGetAll({
|
const response = await apiDonationGetAll({
|
||||||
category: "beranda"
|
category: "beranda"
|
||||||
});
|
});
|
||||||
|
console.log("[RES GET ALL]", JSON.stringify(response.data, null, 2));
|
||||||
|
|
||||||
setList(response.data);
|
setList(response.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import { Href, router, useFocusEffect } from "expo-router";
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
import Toast from "react-native-toast-message";
|
|
||||||
|
|
||||||
export default function DonationMyDonation() {
|
export default function DonationMyDonation() {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
@@ -26,25 +25,20 @@ export default function DonationMyDonation() {
|
|||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
onLoadData();
|
onLoadData();
|
||||||
}, [user?.id]),
|
}, [user?.id])
|
||||||
);
|
);
|
||||||
|
|
||||||
const onLoadData = async () => {
|
const onLoadData = async () => {
|
||||||
if (!user?.id) {
|
|
||||||
Toast.show({
|
|
||||||
type: "error",
|
|
||||||
text1: "Load data gagal, user tidak ditemukan",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setLoadList(true);
|
setLoadList(true);
|
||||||
const response = await apiDonationGetAll({
|
const response = await apiDonationGetAll({
|
||||||
category: "my-donation",
|
category: "my-donation",
|
||||||
authorId: user?.id,
|
authorId: user?.id,
|
||||||
});
|
});
|
||||||
|
console.log(
|
||||||
|
"[RES GET MY DONATION]",
|
||||||
|
JSON.stringify(response.data, null, 2)
|
||||||
|
);
|
||||||
|
|
||||||
setList(response.data);
|
setList(response.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -9,16 +9,14 @@ import { useAuth } from "@/hooks/use-auth";
|
|||||||
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
import Donasi_BoxStatus from "@/screens/Donation/BoxStatus";
|
import Donasi_BoxStatus from "@/screens/Donation/BoxStatus";
|
||||||
import { apiDonationGetByStatus } from "@/service/api-client/api-donation";
|
import { apiDonationGetByStatus } from "@/service/api-client/api-donation";
|
||||||
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { useFocusEffect } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function DonationStatus() {
|
export default function DonationStatus() {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const { status } = useLocalSearchParams<{ status?: string }>();
|
|
||||||
|
|
||||||
const [activeCategory, setActiveCategory] = useState<string | null>(
|
const [activeCategory, setActiveCategory] = useState<string | null>(
|
||||||
status || "publish",
|
"publish"
|
||||||
);
|
);
|
||||||
const [listData, setListData] = useState<any[] | null>(null);
|
const [listData, setListData] = useState<any[] | null>(null);
|
||||||
const [loadList, setLoadList] = useState(false);
|
const [loadList, setLoadList] = useState(false);
|
||||||
@@ -26,7 +24,7 @@ export default function DonationStatus() {
|
|||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
onLoadList();
|
onLoadList();
|
||||||
}, [activeCategory]),
|
}, [activeCategory])
|
||||||
);
|
);
|
||||||
|
|
||||||
const onLoadList = async () => {
|
const onLoadList = async () => {
|
||||||
|
|||||||
@@ -10,32 +10,21 @@ import {
|
|||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
||||||
import { LOCAL_STORAGE_KEY } from "@/constants/local-storage-key";
|
import { LOCAL_STORAGE_KEY } from "@/constants/local-storage-key";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
||||||
import { Ionicons } from "@expo/vector-icons";
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
|
||||||
|
|
||||||
export default function InvestmentInputDonation() {
|
export default function InvestmentInputDonation() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
const [nominal, setNominal] = useState<number>(0);
|
const [nominal, setNominal] = useState<number>(0);
|
||||||
|
|
||||||
const handlerSubmit = async () => {
|
const handlerSubmit = async () => {
|
||||||
if (!user?.id) {
|
|
||||||
Toast.show({
|
|
||||||
type: "error",
|
|
||||||
text1: "User tidak ditemukan",
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
await AsyncStorage.setItem(
|
await AsyncStorage.setItem(
|
||||||
LOCAL_STORAGE_KEY.transactionDonation,
|
LOCAL_STORAGE_KEY.transactionDonation,
|
||||||
JSON.stringify({ nominal: nominal.toString() }),
|
JSON.stringify({ nominal: nominal.toString() })
|
||||||
);
|
);
|
||||||
router.replace(`/donation/${id}/select-bank`);
|
router.replace(`/donation/${id}/select-bank`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import Donation_ComponentBoxDetailData from "@/screens/Donation/ComponentBoxDeta
|
|||||||
import Donation_ComponentStoryFunrising from "@/screens/Donation/ComponentStoryFunrising";
|
import Donation_ComponentStoryFunrising from "@/screens/Donation/ComponentStoryFunrising";
|
||||||
import Donation_ProgressSection from "@/screens/Donation/ProgressSection";
|
import Donation_ProgressSection from "@/screens/Donation/ProgressSection";
|
||||||
import { apiDonationGetOne } from "@/service/api-client/api-donation";
|
import { apiDonationGetOne } from "@/service/api-client/api-donation";
|
||||||
import { countDownAndCondition } from "@/utils/countDownAndCondition";
|
|
||||||
import { FontAwesome6 } from "@expo/vector-icons";
|
import { FontAwesome6 } from "@expo/vector-icons";
|
||||||
import {
|
import {
|
||||||
router,
|
router,
|
||||||
@@ -25,7 +24,7 @@ import {
|
|||||||
useLocalSearchParams,
|
useLocalSearchParams,
|
||||||
} from "expo-router";
|
} from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function DonasiDetailStatus() {
|
export default function DonasiDetailStatus() {
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
@@ -59,27 +58,6 @@ export default function DonasiDetailStatus() {
|
|||||||
setOpenDrawer(false);
|
setOpenDrawer(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const [value, setValue] = useState({
|
|
||||||
sisa: 0,
|
|
||||||
reminder: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
updateCountDown();
|
|
||||||
}, [data]);
|
|
||||||
|
|
||||||
const updateCountDown = () => {
|
|
||||||
const countDown = countDownAndCondition({
|
|
||||||
duration: data?.DonasiMaster_Durasi?.name,
|
|
||||||
publishTime: data?.publishTime,
|
|
||||||
});
|
|
||||||
|
|
||||||
setValue({
|
|
||||||
sisa: countDown.durationDay,
|
|
||||||
reminder: countDown.reminder,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
@@ -96,15 +74,10 @@ export default function DonasiDetailStatus() {
|
|||||||
/>
|
/>
|
||||||
<ViewWrapper>
|
<ViewWrapper>
|
||||||
<Donation_ComponentBoxDetailData
|
<Donation_ComponentBoxDetailData
|
||||||
sisaHari={value.sisa}
|
|
||||||
reminder={value.reminder}
|
|
||||||
data={data}
|
data={data}
|
||||||
bottomSection={
|
bottomSection={
|
||||||
status === "publish" && (
|
status === "publish" && (
|
||||||
<Donation_ProgressSection
|
<Donation_ProgressSection id={id as string} />
|
||||||
id={id as string}
|
|
||||||
progres={Number(data?.progres) || 0}
|
|
||||||
/>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export default function DonationCreateStory() {
|
|||||||
type: "success",
|
type: "success",
|
||||||
text1: "Donasi berhasil disimpan",
|
text1: "Donasi berhasil disimpan",
|
||||||
});
|
});
|
||||||
router.replace("/donation/status?status=review");
|
router.replace("/donation/status");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("[ERROR]", error);
|
console.log("[ERROR]", error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -4,34 +4,10 @@ import {
|
|||||||
IconHome,
|
IconHome,
|
||||||
IconStatus,
|
IconStatus,
|
||||||
} from "@/components/_Icon";
|
} from "@/components/_Icon";
|
||||||
import BackButtonFromNotification from "@/components/Button/BackButtonFromNotification";
|
|
||||||
import { TabsStyles } from "@/styles/tabs-styles";
|
import { TabsStyles } from "@/styles/tabs-styles";
|
||||||
import { router, Tabs, useLocalSearchParams, useNavigation } from "expo-router";
|
import { Tabs } from "expo-router";
|
||||||
import { useLayoutEffect } from "react";
|
|
||||||
|
|
||||||
export default function EventTabsLayout() {
|
export default function EventTabsLayout() {
|
||||||
const navigation = useNavigation();
|
|
||||||
|
|
||||||
const { from, category } = useLocalSearchParams<{
|
|
||||||
from?: string;
|
|
||||||
category?: string;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
console.log("from", from);
|
|
||||||
console.log("category", category);
|
|
||||||
|
|
||||||
// Atur header secara dinamis
|
|
||||||
useLayoutEffect(() => {
|
|
||||||
navigation.setOptions({
|
|
||||||
headerLeft: () => (
|
|
||||||
<BackButtonFromNotification
|
|
||||||
from={from as string}
|
|
||||||
category={category as string}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
});
|
|
||||||
}, [from, router, navigation]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs screenOptions={TabsStyles}>
|
<Tabs screenOptions={TabsStyles}>
|
||||||
<Tabs.Screen
|
<Tabs.Screen
|
||||||
|
|||||||
@@ -11,17 +11,15 @@ import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
|||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
import { apiEventGetByStatus } from "@/service/api-client/api-event";
|
import { apiEventGetByStatus } from "@/service/api-client/api-event";
|
||||||
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { useFocusEffect } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function EventStatus() {
|
export default function EventStatus() {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const { status } = useLocalSearchParams<{ status?: string }>();
|
|
||||||
|
|
||||||
const id = user?.id || "";
|
const id = user?.id || "";
|
||||||
const [activeCategory, setActiveCategory] = useState<string | null>(
|
const [activeCategory, setActiveCategory] = useState<string | null>(
|
||||||
status || "publish"
|
"publish"
|
||||||
);
|
);
|
||||||
const [listData, setListData] = useState([]);
|
const [listData, setListData] = useState([]);
|
||||||
const [loadingGetData, setLoadingGetData] = useState(false);
|
const [loadingGetData, setLoadingGetData] = useState(false);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default function EventDetailHistory() {
|
|||||||
<DrawerCustom
|
<DrawerCustom
|
||||||
isVisible={openDrawer}
|
isVisible={openDrawer}
|
||||||
closeDrawer={() => setOpenDrawer(false)}
|
closeDrawer={() => setOpenDrawer(false)}
|
||||||
height={"auto"}
|
height={250}
|
||||||
>
|
>
|
||||||
<MenuDrawerDynamicGrid
|
<MenuDrawerDynamicGrid
|
||||||
data={menuDrawerPublishEvent({ id: id as string })}
|
data={menuDrawerPublishEvent({ id: id as string })}
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
/* eslint-disable react-hooks/exhaustive-deps */
|
/* eslint-disable react-hooks/exhaustive-deps */
|
||||||
import {
|
import {
|
||||||
AlertDefaultSystem,
|
AlertDefaultSystem,
|
||||||
BackButton,
|
|
||||||
ButtonCustom,
|
ButtonCustom,
|
||||||
DotButton,
|
DotButton,
|
||||||
DrawerCustom,
|
DrawerCustom,
|
||||||
|
LoaderCustom,
|
||||||
MenuDrawerDynamicGrid,
|
MenuDrawerDynamicGrid,
|
||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
||||||
import CustomSkeleton from "@/components/_ShareComponent/SkeletonCustom";
|
|
||||||
import LeftButtonCustom from "@/components/Button/BackButton";
|
import LeftButtonCustom from "@/components/Button/BackButton";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import Event_BoxDetailPublishSection from "@/screens/Event/BoxDetailPublishSection";
|
import Event_BoxDetailPublishSection from "@/screens/Event/BoxDetailPublishSection";
|
||||||
@@ -19,26 +18,23 @@ import {
|
|||||||
apiEventGetOne,
|
apiEventGetOne,
|
||||||
apiEventJoin,
|
apiEventJoin,
|
||||||
} from "@/service/api-client/api-event";
|
} from "@/service/api-client/api-event";
|
||||||
import dayjs from "dayjs";
|
|
||||||
import {
|
import {
|
||||||
Redirect,
|
|
||||||
router,
|
router,
|
||||||
Stack,
|
Stack,
|
||||||
useFocusEffect,
|
useFocusEffect,
|
||||||
useLocalSearchParams,
|
useLocalSearchParams,
|
||||||
} from "expo-router";
|
} from "expo-router";
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function EventDetailPublish() {
|
export default function EventDetailPublish() {
|
||||||
const now = new Date().toISOString();
|
|
||||||
const { user } = useAuth();
|
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
|
const { user } = useAuth();
|
||||||
const [openDrawer, setOpenDrawer] = useState(false);
|
const [openDrawer, setOpenDrawer] = useState(false);
|
||||||
const [isLoadingData, setIsLoadingData] = useState(false);
|
const [isLoadingData, setIsLoadingData] = useState(false);
|
||||||
const [isLoadingJoin, setIsLoadingJoin] = useState(false);
|
const [isLoadingJoin, setIsLoadingJoin] = useState(false);
|
||||||
|
|
||||||
const [data, setData] = useState<any>();
|
const [data, setData] = useState();
|
||||||
const [isParticipant, setIsParticipant] = useState<boolean | null>(null);
|
const [isParticipant, setIsParticipant] = useState<boolean | null>(null);
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
@@ -59,6 +55,8 @@ export default function EventDetailPublish() {
|
|||||||
userId: user?.id as string,
|
userId: user?.id as string,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("[RES CHECK PARTICIPANTS]", responseCheckParticipants);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
responseCheckParticipants.success &&
|
responseCheckParticipants.success &&
|
||||||
responseCheckParticipants.data
|
responseCheckParticipants.data
|
||||||
@@ -110,24 +108,7 @@ export default function EventDetailPublish() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const isEventFinished =
|
const footerButton = () => {
|
||||||
id && data?.tanggalSelesai && dayjs(data.tanggalSelesai).isBefore(now);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (isEventFinished) {
|
|
||||||
router.replace(`/(application)/(user)/event/${id}/history`);
|
|
||||||
}
|
|
||||||
}, [isEventFinished, id]);
|
|
||||||
|
|
||||||
if (isEventFinished) {
|
|
||||||
return (
|
|
||||||
<ViewWrapper>
|
|
||||||
<CustomSkeleton />
|
|
||||||
</ViewWrapper>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const FooterButton = () => {
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
@@ -157,17 +138,17 @@ export default function EventDetailPublish() {
|
|||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
options={{
|
options={{
|
||||||
title: `Event Publish`,
|
title: `Event Publish`,
|
||||||
headerLeft: () => <BackButton onPress={() => router.back()} />,
|
headerLeft: () => <LeftButtonCustom />,
|
||||||
headerRight: () => <DotButton onPress={() => setOpenDrawer(true)} />,
|
headerRight: () => <DotButton onPress={() => setOpenDrawer(true)} />,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ViewWrapper>
|
<ViewWrapper>
|
||||||
{isLoadingData ? (
|
{isLoadingData ? (
|
||||||
<CustomSkeleton height={400} />
|
<LoaderCustom />
|
||||||
) : (
|
) : (
|
||||||
<Event_BoxDetailPublishSection
|
<Event_BoxDetailPublishSection
|
||||||
data={data}
|
data={data}
|
||||||
footerButton={FooterButton()}
|
footerButton={footerButton()}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { apiEventCreate } from "@/service/api-client/api-event";
|
|||||||
import { apiMasterEventType } from "@/service/api-client/api-master";
|
import { apiMasterEventType } from "@/service/api-client/api-master";
|
||||||
import { DateTimePickerEvent } from "@react-native-community/datetimepicker";
|
import { DateTimePickerEvent } from "@react-native-community/datetimepicker";
|
||||||
import { router } from "expo-router";
|
import { router } from "expo-router";
|
||||||
import { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
interface EventCreateProps {
|
interface EventCreateProps {
|
||||||
@@ -78,6 +78,23 @@ export default function EventCreate() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (selectedDate) {
|
||||||
|
// console.log("Tanggal yang dipilih:", selectedDate);
|
||||||
|
// console.log(`ISO Format ${Platform.OS}:`, selectedDate.toString());
|
||||||
|
|
||||||
|
// // Kirim ke API atau proses lanjutan
|
||||||
|
// } else {
|
||||||
|
// console.log("Tanggal belum dipilih");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (selectedEndDate) {
|
||||||
|
// console.log("Tanggal yang dipilih:", selectedEndDate);
|
||||||
|
// console.log(`ISO Format ${Platform.OS}:`, selectedEndDate.toString());
|
||||||
|
// // Kirim ke API atau proses lanjutan
|
||||||
|
// } else {
|
||||||
|
// console.log("Tanggal berakhir belum dipilih");
|
||||||
|
// }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|
||||||
@@ -93,7 +110,7 @@ export default function EventCreate() {
|
|||||||
const response = await apiEventCreate(newData);
|
const response = await apiEventCreate(newData);
|
||||||
console.log("Response", JSON.stringify(response, null, 2));
|
console.log("Response", JSON.stringify(response, null, 2));
|
||||||
|
|
||||||
router.replace("/event/status?status=review");
|
router.replace("/event/status");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -1,11 +1,271 @@
|
|||||||
import DetailForum from "@/screens/Forum/DetailForum";
|
import {
|
||||||
import DetailForum2 from "@/screens/Forum/DetailForum2";
|
ButtonCustom,
|
||||||
|
DrawerCustom,
|
||||||
|
LoaderCustom,
|
||||||
|
Spacing,
|
||||||
|
TextAreaCustom,
|
||||||
|
TextCustom,
|
||||||
|
ViewWrapper,
|
||||||
|
} from "@/components";
|
||||||
|
import AlertWarning from "@/components/Alert/AlertWarning";
|
||||||
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
|
import Forum_CommentarBoxSection from "@/screens/Forum/CommentarBoxSection";
|
||||||
|
import Forum_BoxDetailSection from "@/screens/Forum/DiscussionBoxSection";
|
||||||
|
import Forum_MenuDrawerBerandaSection from "@/screens/Forum/MenuDrawerSection.tsx/MenuBeranda";
|
||||||
|
import Forum_MenuDrawerCommentar from "@/screens/Forum/MenuDrawerSection.tsx/MenuCommentar";
|
||||||
|
import {
|
||||||
|
apiForumCreateComment,
|
||||||
|
apiForumGetComment,
|
||||||
|
apiForumGetOne,
|
||||||
|
apiForumUpdateStatus,
|
||||||
|
} from "@/service/api-client/api-forum";
|
||||||
|
import { isBadContent } from "@/utils/badWordsIndonesia";
|
||||||
|
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { useCallback, useEffect, useState } from "react";
|
||||||
|
import { Alert } from "react-native";
|
||||||
|
|
||||||
|
interface CommentProps {
|
||||||
|
id: string;
|
||||||
|
isActive: boolean;
|
||||||
|
komentar: string;
|
||||||
|
createdAt: Date;
|
||||||
|
authorId: string;
|
||||||
|
Author: {
|
||||||
|
id: string;
|
||||||
|
username: string;
|
||||||
|
Profile: {
|
||||||
|
id: string;
|
||||||
|
imageId: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export default function ForumDetail() {
|
export default function ForumDetail() {
|
||||||
|
const { id } = useLocalSearchParams();
|
||||||
|
const { user } = useAuth();
|
||||||
|
const [openDrawer, setOpenDrawer] = useState(false);
|
||||||
|
const [data, setData] = useState<any | null>(null);
|
||||||
|
const [listComment, setListComment] = useState<CommentProps[] | null>(null);
|
||||||
|
const [isLoadingComment, setLoadingComment] = useState(false);
|
||||||
|
|
||||||
|
// Status
|
||||||
|
const [status, setStatus] = useState("");
|
||||||
|
const [text, setText] = useState("");
|
||||||
|
const [authorId, setAuthorId] = useState("");
|
||||||
|
const [dataId, setDataId] = useState("");
|
||||||
|
|
||||||
|
// Comentar
|
||||||
|
const [openDrawerCommentar, setOpenDrawerCommentar] = useState(false);
|
||||||
|
const [commentId, setCommentId] = useState("");
|
||||||
|
const [commentAuthorId, setCommentAuthorId] = useState("");
|
||||||
|
|
||||||
|
useFocusEffect(
|
||||||
|
useCallback(() => {
|
||||||
|
onLoadData(id as string);
|
||||||
|
}, [id])
|
||||||
|
);
|
||||||
|
|
||||||
|
const onLoadData = async (id: string) => {
|
||||||
|
try {
|
||||||
|
const response = await apiForumGetOne({ id });
|
||||||
|
setData(response.data);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
onLoadListComment(id as string);
|
||||||
|
}, [id]);
|
||||||
|
|
||||||
|
const onLoadListComment = async (id: string) => {
|
||||||
|
try {
|
||||||
|
const response = await apiForumGetComment({
|
||||||
|
id: id as string,
|
||||||
|
});
|
||||||
|
setListComment(response.data);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Update Status
|
||||||
|
const handlerUpdateStatus = async (value: any) => {
|
||||||
|
try {
|
||||||
|
const response = await apiForumUpdateStatus({
|
||||||
|
id: id as string,
|
||||||
|
data: value,
|
||||||
|
});
|
||||||
|
if (response.success) {
|
||||||
|
setStatus(response.data);
|
||||||
|
setData({
|
||||||
|
...data,
|
||||||
|
ForumMaster_StatusPosting: {
|
||||||
|
status: response.data,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Create Commentar
|
||||||
|
const handlerCreateCommentar = async () => {
|
||||||
|
if (isBadContent(text)) {
|
||||||
|
AlertWarning({});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const newData = {
|
||||||
|
comment: text,
|
||||||
|
authorId: user?.id,
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
setLoadingComment(true);
|
||||||
|
const response = await apiForumCreateComment({
|
||||||
|
id: id as string,
|
||||||
|
data: newData,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
setText("");
|
||||||
|
const newComment = {
|
||||||
|
id: response.data.id,
|
||||||
|
isActive: response.data.isActive,
|
||||||
|
komentar: response.data.komentar,
|
||||||
|
createdAt: response.data.createdAt,
|
||||||
|
authorId: response.data.authorId,
|
||||||
|
Author: response.data.Author,
|
||||||
|
};
|
||||||
|
setListComment((prev) => [newComment, ...(prev || [])]);
|
||||||
|
setData({
|
||||||
|
...data,
|
||||||
|
count: data.count + 1,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
} finally {
|
||||||
|
setLoadingComment(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <DetailForum />; */}
|
<ViewWrapper>
|
||||||
<DetailForum2 />
|
{!data && !listComment ? (
|
||||||
|
<LoaderCustom />
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
{/* Box Posting */}
|
||||||
|
<Forum_BoxDetailSection
|
||||||
|
data={data}
|
||||||
|
onSetData={() => {
|
||||||
|
setOpenDrawer(true);
|
||||||
|
setStatus(data.ForumMaster_StatusPosting?.status);
|
||||||
|
setAuthorId(data.Author?.id);
|
||||||
|
setDataId(data.id);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Area Commentar */}
|
||||||
|
{data?.ForumMaster_StatusPosting?.status === "Open" && (
|
||||||
|
<>
|
||||||
|
<TextAreaCustom
|
||||||
|
placeholder="Ketik diskusi anda..."
|
||||||
|
maxLength={1000}
|
||||||
|
showCount
|
||||||
|
value={text}
|
||||||
|
onChangeText={setText}
|
||||||
|
style={{
|
||||||
|
marginBottom: 0,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ButtonCustom
|
||||||
|
isLoading={isLoadingComment}
|
||||||
|
style={{
|
||||||
|
alignSelf: "flex-end",
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
handlerCreateCommentar();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Balas
|
||||||
|
</ButtonCustom>
|
||||||
</>
|
</>
|
||||||
)
|
)}
|
||||||
|
<Spacing height={40} />
|
||||||
|
|
||||||
|
{/* List Commentar */}
|
||||||
|
{_.isEmpty(listComment) ? (
|
||||||
|
<TextCustom align="center" color="gray" size={"small"}>
|
||||||
|
Tidak ada komentar
|
||||||
|
</TextCustom>
|
||||||
|
) : (
|
||||||
|
<TextCustom color="gray">Komentar :</TextCustom>
|
||||||
|
)}
|
||||||
|
<Spacing height={5} />
|
||||||
|
{listComment?.map((item: any, index: number) => (
|
||||||
|
<Forum_CommentarBoxSection
|
||||||
|
key={index}
|
||||||
|
data={item}
|
||||||
|
onSetData={(value) => {
|
||||||
|
setCommentId(value.setCommentId);
|
||||||
|
setOpenDrawerCommentar(value.setOpenDrawer);
|
||||||
|
setCommentAuthorId(value.setCommentAuthorId);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</ViewWrapper>
|
||||||
|
|
||||||
|
{/* Posting Drawer */}
|
||||||
|
<DrawerCustom
|
||||||
|
height={"auto"}
|
||||||
|
isVisible={openDrawer}
|
||||||
|
closeDrawer={() => setOpenDrawer(false)}
|
||||||
|
>
|
||||||
|
<Forum_MenuDrawerBerandaSection
|
||||||
|
id={dataId}
|
||||||
|
authorUsername={data?.Author?.username as string}
|
||||||
|
status={status}
|
||||||
|
setIsDrawerOpen={() => {
|
||||||
|
setOpenDrawer(false);
|
||||||
|
}}
|
||||||
|
authorId={authorId}
|
||||||
|
handlerUpdateStatus={(value: any) => {
|
||||||
|
handlerUpdateStatus(value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</DrawerCustom>
|
||||||
|
|
||||||
|
{/* Commentar Drawer */}
|
||||||
|
<DrawerCustom
|
||||||
|
height={"auto"}
|
||||||
|
isVisible={openDrawerCommentar}
|
||||||
|
closeDrawer={() => setOpenDrawerCommentar(false)}
|
||||||
|
>
|
||||||
|
<Forum_MenuDrawerCommentar
|
||||||
|
id={commentId as string}
|
||||||
|
commentId={commentId}
|
||||||
|
commentAuthorId={commentAuthorId}
|
||||||
|
setIsDrawerOpen={() => {
|
||||||
|
setOpenDrawerCommentar(false);
|
||||||
|
}}
|
||||||
|
listComment={listComment}
|
||||||
|
setListComment={setListComment}
|
||||||
|
countComment={data?.count}
|
||||||
|
setCountComment={(val: any) => {
|
||||||
|
setData((prev: any) => ({
|
||||||
|
...prev,
|
||||||
|
count: val,
|
||||||
|
}));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</DrawerCustom>
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import { apiForumCreateReportCommentar } from "@/service/api-client/api-forum";
|
import { apiForumCreateReportCommentar } from "@/service/api-client/api-master";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import { apiForumCreateReportPosting } from "@/service/api-client/api-forum";
|
import { apiForumCreateReportPosting } from "@/service/api-client/api-master";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|||||||
@@ -1,91 +0,0 @@
|
|||||||
import {
|
|
||||||
BaseBox,
|
|
||||||
NewWrapper,
|
|
||||||
Spacing,
|
|
||||||
StackCustom,
|
|
||||||
TextCustom,
|
|
||||||
} from "@/components";
|
|
||||||
import ListSkeletonComponent from "@/components/_ShareComponent/ListSkeletonComponent";
|
|
||||||
import NoDataText from "@/components/_ShareComponent/NoDataText";
|
|
||||||
import CustomSkeleton from "@/components/_ShareComponent/SkeletonCustom";
|
|
||||||
import { apiForumGetReportComment } from "@/service/api-client/api-forum";
|
|
||||||
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
|
||||||
import _ from "lodash";
|
|
||||||
import { useCallback, useState } from "react";
|
|
||||||
|
|
||||||
export default function ForumPreviewReportComment() {
|
|
||||||
const { id } = useLocalSearchParams();
|
|
||||||
const [data, setData] = useState<any | null>(null);
|
|
||||||
const [listData, setListData] = useState<any | null>(null);
|
|
||||||
const [loading, setLoading] = useState<boolean>(false);
|
|
||||||
// Status
|
|
||||||
|
|
||||||
useFocusEffect(
|
|
||||||
useCallback(() => {
|
|
||||||
onLoadData(id as string);
|
|
||||||
}, [id])
|
|
||||||
);
|
|
||||||
|
|
||||||
const onLoadData = async (id: string) => {
|
|
||||||
try {
|
|
||||||
setLoading(true);
|
|
||||||
const response = await apiForumGetReportComment({ id });
|
|
||||||
setData(response.data);
|
|
||||||
setListData(response?.data?.Forum_ReportKomentar);
|
|
||||||
} catch (error) {
|
|
||||||
console.log("[ERROR]", error);
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<NewWrapper>
|
|
||||||
<StackCustom>
|
|
||||||
<TextCustom color="red" bold>
|
|
||||||
Komentar anda telah melanggar aturan forum ! Admin mengambil
|
|
||||||
tindakan untuk menghapus komentar anda!
|
|
||||||
</TextCustom>
|
|
||||||
{loading ? (
|
|
||||||
<CustomSkeleton height={100} />
|
|
||||||
) : (
|
|
||||||
<BaseBox>
|
|
||||||
<TextCustom>"{data?.komentar ? data?.komentar : "-"}"</TextCustom>
|
|
||||||
</BaseBox>
|
|
||||||
)}
|
|
||||||
</StackCustom>
|
|
||||||
|
|
||||||
<Spacing height={10} />
|
|
||||||
<TextCustom bold>Beberapa laporan yang telah diterima</TextCustom>
|
|
||||||
<Spacing height={10} />
|
|
||||||
|
|
||||||
{loading ? (
|
|
||||||
<ListSkeletonComponent />
|
|
||||||
) : _.isEmpty(listData) ? (
|
|
||||||
<NoDataText />
|
|
||||||
) : (
|
|
||||||
listData?.map((e: any, index: number) => (
|
|
||||||
<BaseBox key={index}>
|
|
||||||
{e?.deskripsi ? (
|
|
||||||
<StackCustom gap={"sm"}>
|
|
||||||
<TextCustom bold>Laporan Lainnya</TextCustom>
|
|
||||||
<TextCustom>{e?.deskripsi}</TextCustom>
|
|
||||||
</StackCustom>
|
|
||||||
) : (
|
|
||||||
<StackCustom gap={"sm"}>
|
|
||||||
<TextCustom bold>
|
|
||||||
{e?.ForumMaster_KategoriReport?.title}
|
|
||||||
</TextCustom>
|
|
||||||
<TextCustom>
|
|
||||||
{e?.ForumMaster_KategoriReport?.deskripsi}
|
|
||||||
</TextCustom>
|
|
||||||
</StackCustom>
|
|
||||||
)}
|
|
||||||
</BaseBox>
|
|
||||||
))
|
|
||||||
)}
|
|
||||||
</NewWrapper>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
import {
|
|
||||||
BaseBox,
|
|
||||||
NewWrapper,
|
|
||||||
Spacing,
|
|
||||||
StackCustom,
|
|
||||||
TextCustom,
|
|
||||||
} from "@/components";
|
|
||||||
import ListSkeletonComponent from "@/components/_ShareComponent/ListSkeletonComponent";
|
|
||||||
import NoDataText from "@/components/_ShareComponent/NoDataText";
|
|
||||||
import CustomSkeleton from "@/components/_ShareComponent/SkeletonCustom";
|
|
||||||
import { apiForumGetReportPosting } from "@/service/api-client/api-forum";
|
|
||||||
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
|
||||||
import _ from "lodash";
|
|
||||||
import { useCallback, useState } from "react";
|
|
||||||
|
|
||||||
export default function ForumPreviewReportPosting() {
|
|
||||||
const { id } = useLocalSearchParams();
|
|
||||||
const [data, setData] = useState<any | null>(null);
|
|
||||||
const [listData, setListData] = useState<any | null>(null);
|
|
||||||
const [loading, setLoading] = useState<boolean>(false);
|
|
||||||
// Status
|
|
||||||
|
|
||||||
useFocusEffect(
|
|
||||||
useCallback(() => {
|
|
||||||
onLoadData(id as string);
|
|
||||||
}, [id])
|
|
||||||
);
|
|
||||||
|
|
||||||
const onLoadData = async (id: string) => {
|
|
||||||
try {
|
|
||||||
setLoading(true);
|
|
||||||
const response = await apiForumGetReportPosting({ id });
|
|
||||||
setData(response.data);
|
|
||||||
setListData(response?.data?.Forum_ReportPosting);
|
|
||||||
} catch (error) {
|
|
||||||
console.log("[ERROR]", error);
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<NewWrapper>
|
|
||||||
<StackCustom>
|
|
||||||
<TextCustom color="red" bold>
|
|
||||||
Postingan anda telah melanggar aturan forum ! Admin mengambil
|
|
||||||
tindakan untuk menghapus komentar anda!
|
|
||||||
</TextCustom>
|
|
||||||
{loading ? (
|
|
||||||
<CustomSkeleton height={100} />
|
|
||||||
) : (
|
|
||||||
<BaseBox>
|
|
||||||
<TextCustom>"{data?.diskusi ? data?.diskusi : "-"}"</TextCustom>
|
|
||||||
</BaseBox>
|
|
||||||
)}
|
|
||||||
</StackCustom>
|
|
||||||
|
|
||||||
<Spacing height={10} />
|
|
||||||
<TextCustom bold>Beberapa laporan yang telah diterima</TextCustom>
|
|
||||||
<Spacing height={10} />
|
|
||||||
|
|
||||||
{loading ? (
|
|
||||||
<ListSkeletonComponent />
|
|
||||||
) : _.isEmpty(listData) ? (
|
|
||||||
<NoDataText />
|
|
||||||
) : (
|
|
||||||
listData?.map((e: any) => (
|
|
||||||
<BaseBox key={e?.id}>
|
|
||||||
{e?.deskripsi ? (
|
|
||||||
<StackCustom gap={"sm"}>
|
|
||||||
<TextCustom bold>Laporan Lainnya</TextCustom>
|
|
||||||
<TextCustom>{e?.deskripsi}</TextCustom>
|
|
||||||
</StackCustom>
|
|
||||||
) : (
|
|
||||||
<StackCustom gap={"sm"}>
|
|
||||||
<TextCustom bold>
|
|
||||||
{e?.ForumMaster_KategoriReport?.title}
|
|
||||||
</TextCustom>
|
|
||||||
<TextCustom>
|
|
||||||
{e?.ForumMaster_KategoriReport?.deskripsi}
|
|
||||||
</TextCustom>
|
|
||||||
</StackCustom>
|
|
||||||
)}
|
|
||||||
</BaseBox>
|
|
||||||
))
|
|
||||||
)}
|
|
||||||
</NewWrapper>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -8,8 +8,7 @@ import {
|
|||||||
import { AccentColor, MainColor } from "@/constants/color-palet";
|
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import Forum_ReportListSection from "@/screens/Forum/ReportListSection";
|
import Forum_ReportListSection from "@/screens/Forum/ReportListSection";
|
||||||
import { apiForumCreateReportCommentar } from "@/service/api-client/api-forum";
|
import { apiForumCreateReportCommentar, apiMasterForumReportList } from "@/service/api-client/api-master";
|
||||||
import { apiMasterForumReportList } from "@/service/api-client/api-master";
|
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import {
|
|||||||
import { AccentColor, MainColor } from "@/constants/color-palet";
|
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import Forum_ReportListSection from "@/screens/Forum/ReportListSection";
|
import Forum_ReportListSection from "@/screens/Forum/ReportListSection";
|
||||||
import { apiForumCreateReportPosting } from "@/service/api-client/api-forum";
|
|
||||||
import {
|
import {
|
||||||
|
apiForumCreateReportPosting,
|
||||||
apiMasterForumReportList,
|
apiMasterForumReportList,
|
||||||
} from "@/service/api-client/api-master";
|
} from "@/service/api-client/api-master";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
|
|||||||
@@ -2,14 +2,15 @@ import {
|
|||||||
BoxButtonOnFooter,
|
BoxButtonOnFooter,
|
||||||
ButtonCustom,
|
ButtonCustom,
|
||||||
TextAreaCustom,
|
TextAreaCustom,
|
||||||
ViewWrapper,
|
ViewWrapper
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AlertWarning from "@/components/Alert/AlertWarning";
|
import AlertWarning from "@/components/Alert/AlertWarning";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import { apiForumCreate } from "@/service/api-client/api-forum";
|
import { apiForumCreate } from "@/service/api-client/api-forum";
|
||||||
import { censorText, isBadContent } from "@/utils/badWordsIndonesia";
|
import { isBadContent } from "@/utils/badWordsIndonesia";
|
||||||
import { router } from "expo-router";
|
import { router } from "expo-router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import { Alert } from "react-native";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function ForumCreate() {
|
export default function ForumCreate() {
|
||||||
@@ -18,22 +19,16 @@ export default function ForumCreate() {
|
|||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
const handlerSubmit = async () => {
|
const handlerSubmit = async () => {
|
||||||
if (text.trim() === "") {
|
|
||||||
AlertWarning({
|
if (isBadContent(text)) {
|
||||||
title: "Lengkapi Data",
|
AlertWarning({})
|
||||||
description: "Postingan tidak boleh kosong",
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bisa di sensor atau return dan tidak bisa di post
|
|
||||||
const cencorContent = censorText(text)
|
|
||||||
|
|
||||||
const newData = {
|
const newData = {
|
||||||
diskusi: cencorContent,
|
diskusi: text,
|
||||||
authorId: user?.id,
|
authorId: user?.id,
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
const response = await apiForumCreate({ data: newData });
|
const response = await apiForumCreate({ data: newData });
|
||||||
@@ -55,7 +50,6 @@ export default function ForumCreate() {
|
|||||||
const buttonFooter = (
|
const buttonFooter = (
|
||||||
<BoxButtonOnFooter>
|
<BoxButtonOnFooter>
|
||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
disabled={!text.trim() || isLoading}
|
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
handlerSubmit();
|
handlerSubmit();
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
/* eslint-disable react-hooks/exhaustive-deps */
|
/* eslint-disable react-hooks/exhaustive-deps */
|
||||||
import Forum_ViewBeranda from "@/screens/Forum/ViewBeranda";
|
import Forum_ViewBeranda from "@/screens/Forum/ViewBeranda";
|
||||||
import Forum_ViewBeranda2 from "@/screens/Forum/ViewBeranda2";
|
import Forum_ViewBeranda2 from "@/screens/Forum/ViewBeranda2";
|
||||||
import Forum_ViewBeranda3 from "@/screens/Forum/ViewBeranda3";
|
|
||||||
|
|
||||||
export default function Forum() {
|
export default function Forum() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <Forum_ViewBeranda /> */}
|
{/* <Forum_ViewBeranda /> */}
|
||||||
{/* <Forum_ViewBeranda2 /> */}
|
<Forum_ViewBeranda2 />
|
||||||
<Forum_ViewBeranda3 />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
import { StackCustom, ViewWrapper } from "@/components";
|
import { StackCustom, ViewWrapper } from "@/components";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import { useNotificationStore } from "@/hooks/use-notification-store";
|
|
||||||
import Home_BottomFeatureSection from "@/screens/Home/bottomFeatureSection";
|
import Home_BottomFeatureSection from "@/screens/Home/bottomFeatureSection";
|
||||||
import HeaderBell from "@/screens/Home/HeaderBell";
|
|
||||||
import Home_ImageSection from "@/screens/Home/imageSection";
|
import Home_ImageSection from "@/screens/Home/imageSection";
|
||||||
import TabSection from "@/screens/Home/tabSection";
|
import TabSection from "@/screens/Home/tabSection";
|
||||||
import { tabsHome } from "@/screens/Home/tabsList";
|
import { tabsHome } from "@/screens/Home/tabsList";
|
||||||
@@ -14,21 +12,21 @@ import { apiUser } from "@/service/api-client/api-user";
|
|||||||
import { apiVersion } from "@/service/api-config";
|
import { apiVersion } from "@/service/api-config";
|
||||||
import { Ionicons } from "@expo/vector-icons";
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
import { Redirect, router, Stack, useFocusEffect } from "expo-router";
|
import { Redirect, router, Stack, useFocusEffect } from "expo-router";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
import { RefreshControl } from "react-native";
|
import { RefreshControl } from "react-native";
|
||||||
|
|
||||||
export default function Application() {
|
export default function Application() {
|
||||||
const { token, user, userData } = useAuth();
|
const { token, user, userData } = useAuth();
|
||||||
const [data, setData] = useState<any>();
|
const [data, setData] = useState<any>();
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
const [refreshing, setRefreshing] = useState(false);
|
||||||
const { syncUnreadCount } = useNotificationStore();
|
console.log("[User] >>", JSON.stringify(user?.id, null, 2));
|
||||||
|
|
||||||
|
// ‼️ Untuk cek apakah: 1. user ada, 2. user punya profile, 3. accept temrs of forum nya ada atau tidak
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
onLoadData();
|
onLoadData();
|
||||||
checkVersion();
|
checkVersion();
|
||||||
userData(token as string);
|
userData(token as string);
|
||||||
syncUnreadCount();
|
|
||||||
}, [user?.id, token])
|
}, [user?.id, token])
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -54,10 +52,10 @@ export default function Application() {
|
|||||||
setRefreshing(false);
|
setRefreshing(false);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// if (user && user?.termsOfServiceAccepted === false) {
|
if (user && user?.termsOfServiceAccepted === false) {
|
||||||
// console.log("User is not accept term service");
|
console.log("User is not accept term service");
|
||||||
// return <Redirect href={`/terms-agreement`} />;
|
return <Redirect href={`/terms-agreement`} />;
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (data && data?.active === false) {
|
if (data && data?.active === false) {
|
||||||
console.log("User is not active");
|
console.log("User is not active");
|
||||||
@@ -84,7 +82,17 @@ export default function Application() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
headerRight: () => <HeaderBell />,
|
headerRight: () => (
|
||||||
|
<Ionicons
|
||||||
|
disabled={true}
|
||||||
|
name="notifications"
|
||||||
|
size={20}
|
||||||
|
color={MainColor.placeholder}
|
||||||
|
onPress={() => {
|
||||||
|
router.push("/notifications");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ViewWrapper
|
<ViewWrapper
|
||||||
@@ -101,10 +109,6 @@ export default function Application() {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StackCustom>
|
<StackCustom>
|
||||||
{/* <ButtonCustom onPress={() => router.push("./test-notifications")}>
|
|
||||||
Test Notif
|
|
||||||
</ButtonCustom> */}
|
|
||||||
|
|
||||||
<Home_ImageSection />
|
<Home_ImageSection />
|
||||||
|
|
||||||
<Home_FeatureSection />
|
<Home_FeatureSection />
|
||||||
|
|||||||
@@ -1,33 +1,9 @@
|
|||||||
import BackButtonFromNotification from "@/components/Button/BackButtonFromNotification";
|
|
||||||
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
||||||
import { TabsStyles } from "@/styles/tabs-styles";
|
import { TabsStyles } from "@/styles/tabs-styles";
|
||||||
import { Feather, FontAwesome6, Ionicons } from "@expo/vector-icons";
|
import { Feather, FontAwesome6, Ionicons } from "@expo/vector-icons";
|
||||||
import { router, Tabs, useLocalSearchParams, useNavigation } from "expo-router";
|
import { Tabs } from "expo-router";
|
||||||
import { useLayoutEffect } from "react";
|
|
||||||
|
|
||||||
export default function InvestmentTabsLayout() {
|
export default function InvestmentTabsLayout() {
|
||||||
// const navigation = useNavigation();
|
|
||||||
|
|
||||||
// const { from, category } = useLocalSearchParams<{
|
|
||||||
// from?: string;
|
|
||||||
// category?: string;
|
|
||||||
// }>();
|
|
||||||
|
|
||||||
// console.log("from", from);
|
|
||||||
// console.log("category", category);
|
|
||||||
|
|
||||||
// // Atur header secara dinamis
|
|
||||||
// useLayoutEffect(() => {
|
|
||||||
// navigation.setOptions({
|
|
||||||
// headerLeft: () => (
|
|
||||||
// <BackButtonFromNotification
|
|
||||||
// from={from as string}
|
|
||||||
// category={category as string}
|
|
||||||
// />
|
|
||||||
// ),
|
|
||||||
// });
|
|
||||||
// }, [from, router, navigation]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs screenOptions={TabsStyles}>
|
<Tabs screenOptions={TabsStyles}>
|
||||||
<Tabs.Screen
|
<Tabs.Screen
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import NoDataText from "@/components/_ShareComponent/NoDataText";
|
import NoDataText from "@/components/_ShareComponent/NoDataText";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import { apiInvestmentGetAll } from "@/service/api-client/api-investment";
|
import {
|
||||||
|
apiInvestmentGetAll
|
||||||
|
} from "@/service/api-client/api-investment";
|
||||||
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
||||||
import { router, useFocusEffect } from "expo-router";
|
import { router, useFocusEffect } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
@@ -61,20 +63,37 @@ export default function InvestmentMyHolding() {
|
|||||||
router.push(`/investment/${item?.id}/(my-holding)/${item?.id}`)
|
router.push(`/investment/${item?.id}/(my-holding)/${item?.id}`)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StackCustom>
|
<Grid>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<StackCustom gap={"xs"}>
|
||||||
<TextCustom truncate={2}>{item?.title}</TextCustom>
|
<TextCustom truncate={2}>{item?.title}</TextCustom>
|
||||||
<TextCustom>
|
|
||||||
|
<Spacing height={5} />
|
||||||
|
<TextCustom size="small">
|
||||||
Rp. {formatCurrencyDisplay(item?.nominal)}
|
Rp. {formatCurrencyDisplay(item?.nominal)}
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
<TextCustom>{item?.lembarTerbeli} Lembar</TextCustom>
|
<TextCustom size="small">
|
||||||
<ProgressCustom
|
{item?.lembarTerbeli} Lembar
|
||||||
label={`${item.progress}%`}
|
</TextCustom>
|
||||||
value={Number(item.progress)}
|
|
||||||
size="lg"
|
|
||||||
animated
|
|
||||||
color="primary"
|
|
||||||
/>
|
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={1}>
|
||||||
|
<View />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col
|
||||||
|
span={5}
|
||||||
|
style={{
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProgressCustom
|
||||||
|
value={item?.progress}
|
||||||
|
label={`${item?.progress}%`}
|
||||||
|
size="lg"
|
||||||
|
/>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -9,16 +9,14 @@ import { useAuth } from "@/hooks/use-auth";
|
|||||||
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
import Investment_StatusBox from "@/screens/Invesment/StatusBox";
|
import Investment_StatusBox from "@/screens/Invesment/StatusBox";
|
||||||
import { apiInvestmentGetByStatus } from "@/service/api-client/api-investment";
|
import { apiInvestmentGetByStatus } from "@/service/api-client/api-investment";
|
||||||
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { useFocusEffect } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function InvestmentPortofolio() {
|
export default function InvestmentPortofolio() {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const { status } = useLocalSearchParams<{ status?: string }>();
|
|
||||||
|
|
||||||
const [activeCategory, setActiveCategory] = useState<string | null>(
|
const [activeCategory, setActiveCategory] = useState<string | null>(
|
||||||
status || "publish"
|
"publish"
|
||||||
);
|
);
|
||||||
|
|
||||||
const [listData, setListData] = useState<any[]>([]);
|
const [listData, setListData] = useState<any[]>([]);
|
||||||
|
|||||||
@@ -115,11 +115,7 @@ export default function InvestmentAddNews() {
|
|||||||
onChangeText={(value) => setData({ ...data, deskripsi: value })}
|
onChangeText={(value) => setData({ ...data, deskripsi: value })}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ButtonCustom
|
<ButtonCustom isLoading={isLoading} onPress={handlerSubmit}>
|
||||||
disabled={!data.title || !data.deskripsi || isLoading}
|
|
||||||
isLoading={isLoading}
|
|
||||||
onPress={handlerSubmit}
|
|
||||||
>
|
|
||||||
Simpan
|
Simpan
|
||||||
</ButtonCustom>
|
</ButtonCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import Toast from "react-native-toast-message";
|
|||||||
|
|
||||||
export default function InvestmentInvoice() {
|
export default function InvestmentInvoice() {
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
|
console.log("[ID]", id);
|
||||||
const [data, setData] = useState<any>({});
|
const [data, setData] = useState<any>({});
|
||||||
const [image, setImage] = useState<IFileData>({
|
const [image, setImage] = useState<IFileData>({
|
||||||
name: "",
|
name: "",
|
||||||
@@ -48,6 +49,7 @@ export default function InvestmentInvoice() {
|
|||||||
category: "invoice",
|
category: "invoice",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("[RES INVOICE]", JSON.stringify(response.data, null, 2));
|
||||||
setData(response.data);
|
setData(response.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("[ERROR]", error);
|
console.log("[ERROR]", error);
|
||||||
@@ -62,6 +64,8 @@ export default function InvestmentInvoice() {
|
|||||||
imageUri: image?.uri,
|
imageUri: image?.uri,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("[RESPONSE UPLOAD IMAGE]", responseUploadImage);
|
||||||
|
|
||||||
if (!responseUploadImage?.data?.id) {
|
if (!responseUploadImage?.data?.id) {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
type: "error",
|
type: "error",
|
||||||
@@ -79,6 +83,10 @@ export default function InvestmentInvoice() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
|
console.log(
|
||||||
|
"[RESPONSE UPDATE]",
|
||||||
|
JSON.stringify(response.data, null, 2)
|
||||||
|
);
|
||||||
Toast.show({
|
Toast.show({
|
||||||
type: "success",
|
type: "success",
|
||||||
text1: "Berhasil mengunggah bukti transfer",
|
text1: "Berhasil mengunggah bukti transfer",
|
||||||
@@ -202,6 +210,7 @@ export default function InvestmentInvoice() {
|
|||||||
pickFile({
|
pickFile({
|
||||||
allowedType: "image",
|
allowedType: "image",
|
||||||
setImageUri(file: any) {
|
setImageUri(file: any) {
|
||||||
|
console.log("[IMAGE]", file);
|
||||||
setImage(file);
|
setImage(file);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -215,7 +224,7 @@ export default function InvestmentInvoice() {
|
|||||||
|
|
||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
disabled={!image || isLoading}
|
disabled={!image}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
handlerSubmitUpdate();
|
handlerSubmitUpdate();
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import Investment_ButtonInvestasiSection from "@/screens/Invesment/ButtonInvesta
|
|||||||
import Invesment_ComponentBoxOnBottomDetail from "@/screens/Invesment/ComponentBoxOnBottomDetail";
|
import Invesment_ComponentBoxOnBottomDetail from "@/screens/Invesment/ComponentBoxOnBottomDetail";
|
||||||
import Invesment_DetailDataPublishSection from "@/screens/Invesment/DetailDataPublishSection";
|
import Invesment_DetailDataPublishSection from "@/screens/Invesment/DetailDataPublishSection";
|
||||||
import { apiInvestmentGetOne } from "@/service/api-client/api-investment";
|
import { apiInvestmentGetOne } from "@/service/api-client/api-investment";
|
||||||
import { countDownAndCondition } from "@/utils/countDownAndCondition";
|
|
||||||
import { AntDesign, MaterialIcons } from "@expo/vector-icons";
|
import { AntDesign, MaterialIcons } from "@expo/vector-icons";
|
||||||
import {
|
import {
|
||||||
router,
|
router,
|
||||||
@@ -24,7 +23,7 @@ import {
|
|||||||
useLocalSearchParams,
|
useLocalSearchParams,
|
||||||
} from "expo-router";
|
} from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function InvestmentDetailStatus() {
|
export default function InvestmentDetailStatus() {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
@@ -64,29 +63,6 @@ export default function InvestmentDetailStatus() {
|
|||||||
setOpenDrawerPublish(false);
|
setOpenDrawerPublish(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const [value, setValue] = useState({
|
|
||||||
sisa: 0,
|
|
||||||
reminder: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
updateCountDown();
|
|
||||||
}, [data]);
|
|
||||||
|
|
||||||
console.log("[DATA DETAIL]", JSON.stringify(data, null, 2));
|
|
||||||
|
|
||||||
const updateCountDown = () => {
|
|
||||||
const countDown = countDownAndCondition({
|
|
||||||
duration: data?.MasterPencarianInvestor.name,
|
|
||||||
publishTime: data?.countDown,
|
|
||||||
});
|
|
||||||
|
|
||||||
setValue({
|
|
||||||
sisa: countDown.durationDay,
|
|
||||||
reminder: countDown.reminder,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const bottomSection = (
|
const bottomSection = (
|
||||||
<Invesment_ComponentBoxOnBottomDetail
|
<Invesment_ComponentBoxOnBottomDetail
|
||||||
id={data?.id}
|
id={data?.id}
|
||||||
@@ -96,11 +72,7 @@ export default function InvestmentDetailStatus() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const buttonSection = (
|
const buttonSection = (
|
||||||
<Investment_ButtonInvestasiSection
|
<Investment_ButtonInvestasiSection id={id as string} isMine={user?.id === data?.author?.id} />
|
||||||
id={id as string}
|
|
||||||
isMine={user?.id === data?.author?.id}
|
|
||||||
reminder={value.reminder}
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -18,7 +18,10 @@ import {
|
|||||||
apiInvestmentUpdateData,
|
apiInvestmentUpdateData,
|
||||||
} from "@/service/api-client/api-investment";
|
} from "@/service/api-client/api-investment";
|
||||||
import { apiMasterInvestment } from "@/service/api-client/api-master";
|
import { apiMasterInvestment } from "@/service/api-client/api-master";
|
||||||
import { deleteFileService, uploadFileService } from "@/service/upload-service";
|
import {
|
||||||
|
deleteFileService,
|
||||||
|
uploadFileService,
|
||||||
|
} from "@/service/upload-service";
|
||||||
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
||||||
import pickFile from "@/utils/pickFile";
|
import pickFile from "@/utils/pickFile";
|
||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
@@ -67,7 +70,7 @@ export default function InvestmentEdit() {
|
|||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
onLoadMaster();
|
onLoadMaster();
|
||||||
onLoadData();
|
onLoadData();
|
||||||
}, [id]),
|
}, [id])
|
||||||
);
|
);
|
||||||
|
|
||||||
const onLoadMaster = async () => {
|
const onLoadMaster = async () => {
|
||||||
@@ -175,7 +178,7 @@ export default function InvestmentEdit() {
|
|||||||
const responseUpdate = await apiInvestmentUpdateData({
|
const responseUpdate = await apiInvestmentUpdateData({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
data: newData,
|
data: newData,
|
||||||
category: "data",
|
category: "data"
|
||||||
});
|
});
|
||||||
|
|
||||||
if (responseUpdate.success) {
|
if (responseUpdate.success) {
|
||||||
@@ -253,7 +256,6 @@ export default function InvestmentEdit() {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<TextInputCustom
|
<TextInputCustom
|
||||||
disabled
|
|
||||||
required
|
required
|
||||||
placeholder="0"
|
placeholder="0"
|
||||||
label="Total Lembar"
|
label="Total Lembar"
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ export default function InvestmentDetail() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const bottomSection = (
|
const bottomSection = (
|
||||||
<Invesment_ComponentBoxOnBottomDetail
|
<Invesment_ComponentBoxOnBottomDetail
|
||||||
id={id as string}
|
id={id as string}
|
||||||
@@ -95,11 +97,7 @@ export default function InvestmentDetail() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const buttonSection = (
|
const buttonSection = (
|
||||||
<Investment_ButtonInvestasiSection
|
<Investment_ButtonInvestasiSection id={id as string} isMine={user?.id === data?.author?.id} reminder={value.reminder} />
|
||||||
id={id as string}
|
|
||||||
isMine={user?.id === data?.author?.id}
|
|
||||||
reminder={value.reminder}
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export default function InvestmentCreate() {
|
|||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
onLoadMaster();
|
onLoadMaster();
|
||||||
}, []),
|
}, [])
|
||||||
);
|
);
|
||||||
|
|
||||||
const onLoadMaster = async () => {
|
const onLoadMaster = async () => {
|
||||||
@@ -167,7 +167,7 @@ export default function InvestmentCreate() {
|
|||||||
text1: "Berhasil",
|
text1: "Berhasil",
|
||||||
text2: response.message,
|
text2: response.message,
|
||||||
});
|
});
|
||||||
router.replace("/investment/portofolio?status=review");
|
router.replace("/investment/portofolio");
|
||||||
} else {
|
} else {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
type: "error",
|
type: "error",
|
||||||
@@ -224,6 +224,7 @@ export default function InvestmentCreate() {
|
|||||||
onPress={() => {
|
onPress={() => {
|
||||||
pickFile({
|
pickFile({
|
||||||
setPdfUri: ({ uri, name, size }) => {
|
setPdfUri: ({ uri, name, size }) => {
|
||||||
|
|
||||||
setPdf({ uri, name, size });
|
setPdf({ uri, name, size });
|
||||||
},
|
},
|
||||||
allowedType: "pdf",
|
allowedType: "pdf",
|
||||||
@@ -264,7 +265,6 @@ export default function InvestmentCreate() {
|
|||||||
|
|
||||||
<StackCustom gap={0}>
|
<StackCustom gap={0}>
|
||||||
<TextInputCustom
|
<TextInputCustom
|
||||||
disabled
|
|
||||||
required
|
required
|
||||||
placeholder="0"
|
placeholder="0"
|
||||||
label="Total Lembar"
|
label="Total Lembar"
|
||||||
@@ -357,11 +357,7 @@ export default function InvestmentCreate() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<Spacing />
|
<Spacing />
|
||||||
<ButtonCustom
|
<ButtonCustom isLoading={isLoading} onPress={() => handleSubmit()}>
|
||||||
disabled={isLoading}
|
|
||||||
isLoading={isLoading}
|
|
||||||
onPress={() => handleSubmit()}
|
|
||||||
>
|
|
||||||
Simpan
|
Simpan
|
||||||
</ButtonCustom>
|
</ButtonCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
|||||||
@@ -1,36 +1,10 @@
|
|||||||
/* eslint-disable react-hooks/exhaustive-deps */
|
|
||||||
import { BackButton } from "@/components";
|
|
||||||
import { IconHome, IconStatus } from "@/components/_Icon";
|
import { IconHome, IconStatus } from "@/components/_Icon";
|
||||||
import BackButtonFromNotification from "@/components/Button/BackButtonFromNotification";
|
|
||||||
import { TabsStyles } from "@/styles/tabs-styles";
|
import { TabsStyles } from "@/styles/tabs-styles";
|
||||||
import { Ionicons } from "@expo/vector-icons";
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
import {
|
import { Tabs } from "expo-router";
|
||||||
router,
|
|
||||||
Tabs,
|
|
||||||
useLocalSearchParams,
|
|
||||||
useNavigation
|
|
||||||
} from "expo-router";
|
|
||||||
import { useLayoutEffect } from "react";
|
|
||||||
|
|
||||||
export default function JobTabsLayout() {
|
export default function JobTabsLayout() {
|
||||||
const navigation = useNavigation();
|
|
||||||
|
|
||||||
const { from, category } = useLocalSearchParams<{
|
|
||||||
from?: string;
|
|
||||||
category?: string;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
// Atur header secara dinamis
|
|
||||||
useLayoutEffect(() => {
|
|
||||||
navigation.setOptions({
|
|
||||||
headerLeft: () => (
|
|
||||||
<BackButtonFromNotification from={from as string} category={category as string} />
|
|
||||||
),
|
|
||||||
});
|
|
||||||
}, [from, router, navigation]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<Tabs screenOptions={TabsStyles}>
|
<Tabs screenOptions={TabsStyles}>
|
||||||
<Tabs.Screen
|
<Tabs.Screen
|
||||||
name="index"
|
name="index"
|
||||||
@@ -56,6 +30,5 @@ export default function JobTabsLayout() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,17 +9,14 @@ import {
|
|||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
import { apiJobGetByStatus } from "@/service/api-client/api-job";
|
import { apiJobGetByStatus } from "@/service/api-client/api-job";
|
||||||
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { useFocusEffect } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function JobStatus() {
|
export default function JobStatus() {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const { status } = useLocalSearchParams<{ status?: string }>();
|
|
||||||
console.log("STATUS", status);
|
|
||||||
|
|
||||||
const [activeCategory, setActiveCategory] = useState<string | null>(
|
const [activeCategory, setActiveCategory] = useState<string | null>(
|
||||||
status || "publish"
|
"publish"
|
||||||
);
|
);
|
||||||
const [listData, setListData] = useState<any[]>([]);
|
const [listData, setListData] = useState<any[]>([]);
|
||||||
const [isLoadList, setIsLoadList] = useState(false);
|
const [isLoadList, setIsLoadList] = useState(false);
|
||||||
@@ -63,14 +60,11 @@ export default function JobStatus() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<ViewWrapper headerComponent={scrollComponent} hideFooter>
|
<ViewWrapper headerComponent={scrollComponent} hideFooter>
|
||||||
{isLoadList ? (
|
{isLoadList ? (
|
||||||
<LoaderCustom />
|
<LoaderCustom />
|
||||||
) : _.isEmpty(listData) ? (
|
) : _.isEmpty(listData) ? (
|
||||||
<TextCustom align="center">
|
<TextCustom align="center">Tidak ada data {activeCategory}</TextCustom>
|
||||||
Tidak ada data {activeCategory}
|
|
||||||
</TextCustom>
|
|
||||||
) : (
|
) : (
|
||||||
listData.map((e, i) => (
|
listData.map((e, i) => (
|
||||||
<BaseBox
|
<BaseBox
|
||||||
@@ -86,6 +80,5 @@ export default function JobStatus() {
|
|||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default function JobDetailStatus() {
|
|||||||
<StackCustom gap={"xs"}>
|
<StackCustom gap={"xs"}>
|
||||||
{data &&
|
{data &&
|
||||||
data?.catatan &&
|
data?.catatan &&
|
||||||
(status === "draft" || status === "reject") && (
|
(status === "draft" || status === "rejected") && (
|
||||||
<ReportBox text={data?.catatan} />
|
<ReportBox text={data?.catatan} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ export default function JobDetail() {
|
|||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
const response = await apiJobGetOne({ id: id as string });
|
const response = await apiJobGetOne({ id: id as string });
|
||||||
|
|
||||||
console.log("DATA", JSON.stringify(response.data, null,2));
|
|
||||||
|
|
||||||
setData(response.data);
|
setData(response.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("[ERROR]", error);
|
console.log("[ERROR]", error);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { useState } from "react";
|
|||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function JobCreate() {
|
export default function JobCreate() {
|
||||||
const nextUrl = "/(application)/(user)/job/(tabs)/status?status=review";
|
const nextUrl = "/(application)/(user)/job/(tabs)/status";
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const [image, setImage] = useState<string | null>(null);
|
const [image, setImage] = useState<string | null>(null);
|
||||||
|
|||||||
@@ -1,9 +1,111 @@
|
|||||||
import ScreenNotification from "@/screens/Notification/ScreenNotification";
|
import {
|
||||||
|
BaseBox,
|
||||||
|
Grid,
|
||||||
|
ScrollableCustom,
|
||||||
|
StackCustom,
|
||||||
|
TextCustom,
|
||||||
|
ViewWrapper,
|
||||||
|
} from "@/components";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { View } from "react-native";
|
||||||
|
|
||||||
export default function Notification() {
|
const categories = [
|
||||||
|
{ value: "all", label: "Semua" },
|
||||||
|
{ value: "event", label: "Event" },
|
||||||
|
{ value: "job", label: "Job" },
|
||||||
|
{ value: "voting", label: "Voting" },
|
||||||
|
{ value: "donasi", label: "Donasi" },
|
||||||
|
{ value: "investasi", label: "Investasi" },
|
||||||
|
{ value: "forum", label: "Forum" },
|
||||||
|
{ value: "collaboration", label: "Collaboration" },
|
||||||
|
];
|
||||||
|
|
||||||
|
const selectedCategory = (value: string) => {
|
||||||
|
const category = categories.find((c) => c.value === value);
|
||||||
|
return category?.label;
|
||||||
|
};
|
||||||
|
|
||||||
|
const BoxNotification = ({
|
||||||
|
index,
|
||||||
|
activeCategory,
|
||||||
|
}: {
|
||||||
|
index: number;
|
||||||
|
activeCategory: string | null;
|
||||||
|
}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ScreenNotification />
|
<BaseBox
|
||||||
|
onPress={() =>
|
||||||
|
console.log(
|
||||||
|
"Notification >",
|
||||||
|
selectedCategory(activeCategory as string)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<StackCustom>
|
||||||
|
<TextCustom bold>
|
||||||
|
# {selectedCategory(activeCategory as string)}
|
||||||
|
</TextCustom>
|
||||||
|
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
borderBottomColor: MainColor.white_gray,
|
||||||
|
borderBottomWidth: 1,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextCustom truncate={2}>
|
||||||
|
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint odio
|
||||||
|
unde quidem voluptate quam culpa sequi molestias ipsa corrupti id,
|
||||||
|
soluta, nostrum adipisci similique, et illo asperiores deleniti eum
|
||||||
|
labore.
|
||||||
|
</TextCustom>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<TextCustom size="small" color="gray">
|
||||||
|
{index + 1} Agustus 2025
|
||||||
|
</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={6} style={{ alignItems: "flex-end" }}>
|
||||||
|
<TextCustom size="small" color="gray">
|
||||||
|
Belum lihat
|
||||||
|
</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function Notifications() {
|
||||||
|
const [activeCategory, setActiveCategory] = useState<string | null>("all");
|
||||||
|
|
||||||
|
const handlePress = (item: any) => {
|
||||||
|
setActiveCategory(item.value);
|
||||||
|
// tambahkan logika lain seperti filter dsb.
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<ViewWrapper
|
||||||
|
headerComponent={
|
||||||
|
<ScrollableCustom
|
||||||
|
data={categories.map((e, i) => ({
|
||||||
|
id: i,
|
||||||
|
label: e.label,
|
||||||
|
value: e.value,
|
||||||
|
}))}
|
||||||
|
onButtonPress={handlePress}
|
||||||
|
activeId={activeCategory as string}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{Array.from({ length: 20 }).map((e, i) => (
|
||||||
|
<View key={i}>
|
||||||
|
<BoxNotification index={i} activeCategory={activeCategory as any} />
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</ViewWrapper>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
CenterCustom,
|
CenterCustom,
|
||||||
Grid,
|
Grid,
|
||||||
InformationBox,
|
InformationBox,
|
||||||
NewWrapper,
|
|
||||||
SelectCustom,
|
SelectCustom,
|
||||||
Spacing,
|
Spacing,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
@@ -121,7 +120,7 @@ export default function PortofolioCreate() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NewWrapper
|
<ViewWrapper
|
||||||
footerComponent={
|
footerComponent={
|
||||||
<Portofolio_ButtonCreate
|
<Portofolio_ButtonCreate
|
||||||
id={id as string}
|
id={id as string}
|
||||||
@@ -358,8 +357,8 @@ export default function PortofolioCreate() {
|
|||||||
setDataMedsos({ ...dataMedsos, youtube: value })
|
setDataMedsos({ ...dataMedsos, youtube: value })
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{/* <Spacing /> */}
|
<Spacing />
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</NewWrapper>
|
</ViewWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,14 @@ import {
|
|||||||
BoxButtonOnFooter,
|
BoxButtonOnFooter,
|
||||||
ButtonCustom,
|
ButtonCustom,
|
||||||
CenterCustom,
|
CenterCustom,
|
||||||
NewWrapper,
|
|
||||||
SelectCustom,
|
SelectCustom,
|
||||||
Spacing,
|
Spacing,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextAreaCustom,
|
TextAreaCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
TextInputCustom,
|
TextInputCustom,
|
||||||
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import ListSkeletonComponent from "@/components/_ShareComponent/ListSkeletonComponent";
|
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_XLARGE } from "@/constants/constans-value";
|
import { ICON_SIZE_XLARGE } from "@/constants/constans-value";
|
||||||
import {
|
import {
|
||||||
@@ -239,7 +238,7 @@ export default function PortofolioEdit() {
|
|||||||
return !dataArray.some(
|
return !dataArray.some(
|
||||||
(item: any) =>
|
(item: any) =>
|
||||||
!item.MasterSubBidangBisnis.id ||
|
!item.MasterSubBidangBisnis.id ||
|
||||||
item.MasterSubBidangBisnis.id.trim() === "",
|
item.MasterSubBidangBisnis.id.trim() === ""
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,16 +319,16 @@ export default function PortofolioEdit() {
|
|||||||
if (!bidangBisnis || !subBidangBisnis) {
|
if (!bidangBisnis || !subBidangBisnis) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<NewWrapper>
|
<ViewWrapper>
|
||||||
<ListSkeletonComponent height={80} />
|
<ActivityIndicator size="large" color={MainColor.yellow} />
|
||||||
</NewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<NewWrapper footerComponent={buttonUpdate}>
|
<ViewWrapper footerComponent={buttonUpdate}>
|
||||||
<StackCustom gap={"xs"}>
|
<StackCustom gap={"xs"}>
|
||||||
<TextInputCustom
|
<TextInputCustom
|
||||||
required
|
required
|
||||||
@@ -472,7 +471,7 @@ export default function PortofolioEdit() {
|
|||||||
/>
|
/>
|
||||||
<Spacing />
|
<Spacing />
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</NewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,28 @@
|
|||||||
import ViewListPortofolio from "@/screens/Portofolio/ViewListPortofolio";
|
import { TextCustom, ViewWrapper } from "@/components";
|
||||||
|
import Portofolio_BoxView from "@/screens/Portofolio/BoxPortofolioView";
|
||||||
|
import { apiGetPortofolio } from "@/service/api-client/api-portofolio";
|
||||||
|
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function ListPortofolio() {
|
export default function ListPortofolio() {
|
||||||
|
const { id } = useLocalSearchParams();
|
||||||
|
const [data, setData] = useState<any[]>([]);
|
||||||
|
|
||||||
|
useFocusEffect(
|
||||||
|
useCallback(() => {
|
||||||
|
onLoadPortofolio(id as string);
|
||||||
|
}, [id])
|
||||||
|
);
|
||||||
|
|
||||||
|
const onLoadPortofolio = async (id: string) => {
|
||||||
|
const response = await apiGetPortofolio({ id: id });
|
||||||
|
setData(response.data);
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<ViewWrapper>
|
||||||
<ViewListPortofolio />
|
{data ? data?.map((item: any, index: number) => (
|
||||||
</>
|
<Portofolio_BoxView key={index} data={item} />
|
||||||
|
)) : <TextCustom>Tidak ada portofolio</TextCustom>}
|
||||||
|
</ViewWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,9 +139,7 @@ const ButtonnDot = ({
|
|||||||
isUserCheck: boolean;
|
isUserCheck: boolean;
|
||||||
logout: () => Promise<void>;
|
logout: () => Promise<void>;
|
||||||
}) => {
|
}) => {
|
||||||
console.log("[ID] >>", id);
|
const isId = id === undefined || id === null;
|
||||||
|
|
||||||
const isId = id === undefined || id === "undefined";
|
|
||||||
|
|
||||||
if (isId) {
|
if (isId) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export default function ProfileLayout() {
|
|||||||
|
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="[id]/blocked-list"
|
name="[id]/blocked-list"
|
||||||
options={{ title: "Daftar Blokir", headerLeft: () => <BackButton /> }}
|
options={{ title: "Blocked List", headerLeft: () => <BackButton /> }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
import {
|
|
||||||
ButtonCustom,
|
|
||||||
NewWrapper,
|
|
||||||
StackCustom,
|
|
||||||
TextInputCustom,
|
|
||||||
} from "@/components";
|
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import { apiNotificationsSend } from "@/service/api-notifications";
|
|
||||||
import { useState } from "react";
|
|
||||||
import Toast from "react-native-toast-message";
|
|
||||||
|
|
||||||
export default function TestNotification() {
|
|
||||||
const { user } = useAuth();
|
|
||||||
const [data, setData] = useState("");
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
try {
|
|
||||||
console.log("[Data Dikirim]", data);
|
|
||||||
setLoading(true);
|
|
||||||
const response = await apiNotificationsSend({
|
|
||||||
data: {
|
|
||||||
title: "Test Notification !!",
|
|
||||||
body: data,
|
|
||||||
userLoginId: user?.id || "",
|
|
||||||
appId: "hipmi",
|
|
||||||
status: "publish",
|
|
||||||
kategoriApp: "JOB",
|
|
||||||
type: "announcement",
|
|
||||||
deepLink: "/job/cmhjz8u3h0005cfaxezyeilrr",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
if (response.success) {
|
|
||||||
console.log("[RES SEND NOTIF]", JSON.stringify(response, null, 2));
|
|
||||||
Toast.show({
|
|
||||||
type: "success",
|
|
||||||
text1: "Notifikasi berhasil dikirim",
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Toast.show({
|
|
||||||
type: "error",
|
|
||||||
text1: "Gagal mengirim notifikasi",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log("[ERROR SEND NOTIF]", error);
|
|
||||||
Toast.show({
|
|
||||||
type: "error",
|
|
||||||
text1: "Gagal mengirim notifikasi",
|
|
||||||
});
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<NewWrapper>
|
|
||||||
<StackCustom>
|
|
||||||
<TextInputCustom
|
|
||||||
required
|
|
||||||
label="Pesan"
|
|
||||||
placeholder="Masukkan pesan"
|
|
||||||
value={data}
|
|
||||||
onChangeText={(text) => setData(text)}
|
|
||||||
/>
|
|
||||||
<ButtonCustom onPress={handleSubmit} disabled={loading}>
|
|
||||||
Kirim
|
|
||||||
</ButtonCustom>
|
|
||||||
</StackCustom>
|
|
||||||
</NewWrapper>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,115 @@
|
|||||||
import UserSearchMainView from "@/screens/UserSeach/MainView";
|
import {
|
||||||
import UserSearchMainView_V2 from "@/screens/UserSeach/MainView_V2";
|
AvatarComp,
|
||||||
|
ClickableCustom,
|
||||||
|
Grid,
|
||||||
|
LoaderCustom,
|
||||||
|
Spacing,
|
||||||
|
StackCustom,
|
||||||
|
TextCustom,
|
||||||
|
TextInputCustom,
|
||||||
|
ViewWrapper,
|
||||||
|
} from "@/components";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
||||||
|
import { apiAllUser } from "@/service/api-client/api-user";
|
||||||
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
|
import { router } from "expo-router";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function UserSearch() {
|
export default function UserSearch() {
|
||||||
|
const [data, setData] = useState<any[]>([]);
|
||||||
|
const [search, setSearch] = useState<string>("");
|
||||||
|
const [isLoadList, setIsLoadList] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
onLoadData(search);
|
||||||
|
}, [search]);
|
||||||
|
|
||||||
|
const onLoadData = async (search: string) => {
|
||||||
|
try {
|
||||||
|
setIsLoadList(true);
|
||||||
|
const response = await apiAllUser({ search: search });
|
||||||
|
console.log("[DATA USER] >", JSON.stringify(response.data, null, 2));
|
||||||
|
setData(response.data);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("Error fetching data", error);
|
||||||
|
} finally {
|
||||||
|
setIsLoadList(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSearch = (search: string) => {
|
||||||
|
setSearch(search);
|
||||||
|
onLoadData(search);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <UserSearchMainView /> */}
|
<ViewWrapper
|
||||||
<UserSearchMainView_V2 />
|
headerComponent={
|
||||||
|
<TextInputCustom
|
||||||
|
value={search}
|
||||||
|
onChangeText={handleSearch}
|
||||||
|
iconLeft={
|
||||||
|
<Ionicons
|
||||||
|
name="search"
|
||||||
|
size={ICON_SIZE_SMALL}
|
||||||
|
color={MainColor.placeholder}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
placeholder="Cari Pengguna"
|
||||||
|
borderRadius={50}
|
||||||
|
containerStyle={{ marginBottom: 0 }}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<StackCustom>
|
||||||
|
{isLoadList ? (
|
||||||
|
<LoaderCustom />
|
||||||
|
) : !_.isEmpty(data) ? (
|
||||||
|
data?.map((e, index) => {
|
||||||
|
return (
|
||||||
|
<ClickableCustom
|
||||||
|
key={index}
|
||||||
|
onPress={() => {
|
||||||
|
console.log("Ke Profile");
|
||||||
|
router.push(`/profile/${e?.Profile?.id}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<AvatarComp fileId={e?.Profile?.imageId} size="base" />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={9}>
|
||||||
|
<StackCustom gap={"sm"}>
|
||||||
|
<TextCustom size="large">{e?.username}</TextCustom>
|
||||||
|
<TextCustom size="small">+{e?.nomor}</TextCustom>
|
||||||
|
</StackCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col
|
||||||
|
span={1}
|
||||||
|
style={{
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "flex-end",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Ionicons
|
||||||
|
name="chevron-forward"
|
||||||
|
size={ICON_SIZE_SMALL}
|
||||||
|
color={MainColor.white}
|
||||||
|
/>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</ClickableCustom>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
) : (
|
||||||
|
<TextCustom align="center">Tidak ditemukan</TextCustom>
|
||||||
|
)}
|
||||||
|
</StackCustom>
|
||||||
|
<Spacing height={50} />
|
||||||
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,34 +4,10 @@ import {
|
|||||||
IconHome,
|
IconHome,
|
||||||
IconStatus,
|
IconStatus,
|
||||||
} from "@/components/_Icon";
|
} from "@/components/_Icon";
|
||||||
import BackButtonFromNotification from "@/components/Button/BackButtonFromNotification";
|
|
||||||
import { TabsStyles } from "@/styles/tabs-styles";
|
import { TabsStyles } from "@/styles/tabs-styles";
|
||||||
import { Tabs, useLocalSearchParams, useNavigation, router } from "expo-router";
|
import { Tabs } from "expo-router";
|
||||||
import { useLayoutEffect } from "react";
|
|
||||||
|
|
||||||
export default function VotingTabsLayout() {
|
export default function VotingTabsLayout() {
|
||||||
const navigation = useNavigation();
|
|
||||||
|
|
||||||
const { from, category } = useLocalSearchParams<{
|
|
||||||
from?: string;
|
|
||||||
category?: string;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
console.log("from", from);
|
|
||||||
console.log("category", category);
|
|
||||||
|
|
||||||
// Atur header secara dinamis
|
|
||||||
useLayoutEffect(() => {
|
|
||||||
navigation.setOptions({
|
|
||||||
headerLeft: () => (
|
|
||||||
<BackButtonFromNotification
|
|
||||||
from={from as string}
|
|
||||||
category={category as string}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
});
|
|
||||||
}, [from, router, navigation]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs screenOptions={TabsStyles}>
|
<Tabs screenOptions={TabsStyles}>
|
||||||
<Tabs.Screen
|
<Tabs.Screen
|
||||||
|
|||||||
@@ -12,17 +12,15 @@ import { useAuth } from "@/hooks/use-auth";
|
|||||||
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
import { apiVotingGetByStatus } from "@/service/api-client/api-voting";
|
import { apiVotingGetByStatus } from "@/service/api-client/api-voting";
|
||||||
import { dateTimeView } from "@/utils/dateTimeView";
|
import { dateTimeView } from "@/utils/dateTimeView";
|
||||||
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { useFocusEffect } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function VotingStatus() {
|
export default function VotingStatus() {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const { status } = useLocalSearchParams<{ status?: string }>();
|
|
||||||
|
|
||||||
const id = user?.id || "";
|
const id = user?.id || "";
|
||||||
const [activeCategory, setActiveCategory] = useState<string | null>(
|
const [activeCategory, setActiveCategory] = useState<string | null>(
|
||||||
status || "publish"
|
"publish"
|
||||||
);
|
);
|
||||||
|
|
||||||
const [listData, setListData] = useState([]);
|
const [listData, setListData] = useState([]);
|
||||||
@@ -88,14 +86,8 @@ export default function VotingStatus() {
|
|||||||
style={{ width: "70%", alignSelf: "center" }}
|
style={{ width: "70%", alignSelf: "center" }}
|
||||||
variant="light"
|
variant="light"
|
||||||
>
|
>
|
||||||
{item?.awalVote &&
|
{item?.awalVote && dateTimeView({date: item?.awalVote, withoutTime: true})} -{" "}
|
||||||
dateTimeView({
|
{item?.akhirVote && dateTimeView({date: item?.akhirVote, withoutTime: true})}
|
||||||
date: item?.awalVote,
|
|
||||||
withoutTime: true,
|
|
||||||
})}{" "}
|
|
||||||
-{" "}
|
|
||||||
{item?.akhirVote &&
|
|
||||||
dateTimeView({ date: item?.akhirVote, withoutTime: true })}
|
|
||||||
</BadgeCustom>
|
</BadgeCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { IconArchive, IconContribution } from "@/components/_Icon";
|
import { IconArchive, IconContribution } from "@/components/_Icon";
|
||||||
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
||||||
import CustomSkeleton from "@/components/_ShareComponent/SkeletonCustom";
|
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import Voting_BoxDetailHasilVotingSection from "@/screens/Voting/BoxDetailHasilVotingSection";
|
import Voting_BoxDetailHasilVotingSection from "@/screens/Voting/BoxDetailHasilVotingSection";
|
||||||
import { Voting_BoxDetailPublishSection } from "@/screens/Voting/BoxDetailPublishSection";
|
import { Voting_BoxDetailPublishSection } from "@/screens/Voting/BoxDetailPublishSection";
|
||||||
@@ -23,14 +22,13 @@ import {
|
|||||||
apiVotingUpdateData,
|
apiVotingUpdateData,
|
||||||
} from "@/service/api-client/api-voting";
|
} from "@/service/api-client/api-voting";
|
||||||
import { today } from "@/utils/dateTimeView";
|
import { today } from "@/utils/dateTimeView";
|
||||||
import dayjs from "dayjs";
|
|
||||||
import {
|
import {
|
||||||
router,
|
router,
|
||||||
Stack,
|
Stack,
|
||||||
useFocusEffect,
|
useFocusEffect,
|
||||||
useLocalSearchParams,
|
useLocalSearchParams,
|
||||||
} from "expo-router";
|
} from "expo-router";
|
||||||
import React, { useCallback, useEffect, useState } from "react";
|
import React, { useCallback, useState } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function VotingDetail() {
|
export default function VotingDetail() {
|
||||||
@@ -121,23 +119,6 @@ export default function VotingDetail() {
|
|||||||
setOpenDrawerPublish(false);
|
setOpenDrawerPublish(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const now = new Date().toISOString();
|
|
||||||
const isEventFinished = id && data?.akhirVote && dayjs(data.akhirVote).isBefore(now);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (isEventFinished) {
|
|
||||||
router.replace(`/(application)/(user)/voting/${id}/history`);
|
|
||||||
}
|
|
||||||
}, [isEventFinished, id]);
|
|
||||||
|
|
||||||
if (isEventFinished) {
|
|
||||||
return (
|
|
||||||
<ViewWrapper>
|
|
||||||
<CustomSkeleton />
|
|
||||||
</ViewWrapper>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export default function VotingCreate() {
|
|||||||
type: "success",
|
type: "success",
|
||||||
text1: "Data berhasil disimpan",
|
text1: "Data berhasil disimpan",
|
||||||
});
|
});
|
||||||
router.replace("/(application)/(user)/voting/(tabs)/status?status=review");
|
router.replace("/(application)/(user)/voting/(tabs)/status");
|
||||||
} else {
|
} else {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
type: "error",
|
type: "error",
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import {
|
import {
|
||||||
AlertDefaultSystem,
|
AlertDefaultSystem,
|
||||||
BoxButtonOnFooter,
|
BoxButtonOnFooter,
|
||||||
|
ButtonCenteredOnly,
|
||||||
ButtonCustom,
|
ButtonCustom,
|
||||||
InformationBox,
|
InformationBox,
|
||||||
NewWrapper,
|
NewWrapper,
|
||||||
StackCustom
|
StackCustom,
|
||||||
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
|
|||||||
@@ -1,29 +1,16 @@
|
|||||||
import { BackButton } from "@/components";
|
import { BackButton } from "@/components";
|
||||||
import BackgroundNotificationHandler from "@/components/Notification/BackgroundNotificationHandler";
|
|
||||||
import NotificationInitializer from "@/components/Notification/NotificationInitializer";
|
|
||||||
import { NotificationProvider } from "@/hooks/use-notification-store";
|
|
||||||
import { HeaderStyles } from "@/styles/header-styles";
|
import { HeaderStyles } from "@/styles/header-styles";
|
||||||
import { Stack } from "expo-router";
|
import { Stack } from "expo-router";
|
||||||
|
|
||||||
export default function ApplicationLayout() {
|
export default function ApplicationLayout() {
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<NotificationProvider>
|
|
||||||
<NotificationInitializer />
|
|
||||||
<BackgroundNotificationHandler />
|
|
||||||
<ApplicationStack />
|
|
||||||
</NotificationProvider>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function ApplicationStack() {
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack screenOptions={HeaderStyles}>
|
<Stack screenOptions={HeaderStyles}>
|
||||||
<Stack.Screen name="(user)" options={{ headerShown: false }} />
|
<Stack.Screen name="(user)" options={{ headerShown: false }} />
|
||||||
<Stack.Screen name="admin" options={{ headerShown: false }} />
|
<Stack.Screen name="admin" options={{ headerShown: false }} />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{/* Take Picture */}
|
{/* Take Picture */}
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="(image)/take-picture/[id]/index"
|
name="(image)/take-picture/[id]/index"
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import {
|
|||||||
ICON_SIZE_XLARGE,
|
ICON_SIZE_XLARGE,
|
||||||
} from "@/constants/constans-value";
|
} from "@/constants/constans-value";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import AdminNotificationBell from "@/screens/Admin/AdminNotificationBell";
|
|
||||||
import {
|
import {
|
||||||
adminListMenu,
|
adminListMenu,
|
||||||
superAdminListMenu,
|
superAdminListMenu,
|
||||||
@@ -193,12 +192,11 @@ export default function AdminLayout() {
|
|||||||
label: "Notifikasi",
|
label: "Notifikasi",
|
||||||
value: "notification",
|
value: "notification",
|
||||||
icon: (
|
icon: (
|
||||||
// <Ionicons
|
<Ionicons
|
||||||
// name="notifications"
|
name="notifications"
|
||||||
// size={ICON_SIZE_SMALL}
|
size={ICON_SIZE_SMALL}
|
||||||
// color={MainColor.white}
|
color={MainColor.white}
|
||||||
// />
|
/>
|
||||||
<AdminNotificationBell/>
|
|
||||||
),
|
),
|
||||||
path: "/admin/notification",
|
path: "/admin/notification",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {
|
import {
|
||||||
AlertDefaultSystem,
|
|
||||||
BadgeCustom,
|
BadgeCustom,
|
||||||
BaseBox,
|
BaseBox,
|
||||||
BoxButtonOnFooter,
|
BoxButtonOnFooter,
|
||||||
@@ -10,7 +9,6 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import {
|
import {
|
||||||
apiAdminDonationInvoiceDetailById,
|
apiAdminDonationInvoiceDetailById,
|
||||||
apiAdminDonationInvoiceUpdateById,
|
apiAdminDonationInvoiceUpdateById,
|
||||||
@@ -24,7 +22,6 @@ import { useCallback, useState } from "react";
|
|||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminDonasiTransactionDetail() {
|
export default function AdminDonasiTransactionDetail() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
console.log("[STATUS]", id, status);
|
console.log("[STATUS]", id, status);
|
||||||
|
|
||||||
@@ -36,7 +33,7 @@ export default function AdminDonasiTransactionDetail() {
|
|||||||
onLoadData();
|
onLoadData();
|
||||||
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [id]),
|
}, [id])
|
||||||
);
|
);
|
||||||
|
|
||||||
const onLoadData = async () => {
|
const onLoadData = async () => {
|
||||||
@@ -60,7 +57,6 @@ export default function AdminDonasiTransactionDetail() {
|
|||||||
const newData = {
|
const newData = {
|
||||||
donationId: data?.donasiId,
|
donationId: data?.donasiId,
|
||||||
nominal: data?.nominal,
|
nominal: data?.nominal,
|
||||||
senderId: user?.id,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await apiAdminDonationInvoiceUpdateById({
|
const response = await apiAdminDonationInvoiceUpdateById({
|
||||||
@@ -101,15 +97,7 @@ export default function AdminDonasiTransactionDetail() {
|
|||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
AlertDefaultSystem({
|
|
||||||
title: "Konfirmasi transaksi",
|
|
||||||
message: "Apakah anda yakin ingin menyetujui transaksi ini?",
|
|
||||||
textLeft: "Tidak",
|
|
||||||
textRight: "Ya",
|
|
||||||
onPressRight: () => {
|
|
||||||
handlerSubmit();
|
handlerSubmit();
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Terima donasi
|
Terima donasi
|
||||||
@@ -152,7 +140,7 @@ export default function AdminDonasiTransactionDetail() {
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{_.startCase(
|
{_.startCase(
|
||||||
(data?.DonasiMaster_StatusInvoice?.name as any) || "-",
|
(data?.DonasiMaster_StatusInvoice?.name as any) || "-"
|
||||||
)}
|
)}
|
||||||
</BadgeCustom>
|
</BadgeCustom>
|
||||||
)) ||
|
)) ||
|
||||||
@@ -169,7 +157,7 @@ export default function AdminDonasiTransactionDetail() {
|
|||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
onPress={() =>
|
onPress={() =>
|
||||||
router.push(
|
router.push(
|
||||||
`/(application)/(image)/preview-image/${data?.imageId}`,
|
`/(application)/(image)/preview-image/${data?.imageId}`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -14,11 +14,7 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import DIRECTORY_ID from "@/constants/directory-id";
|
import DIRECTORY_ID from "@/constants/directory-id";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { apiAdminDonationDetailById, apiAdminDonationDisbursementOfFundsCreated } from "@/service/api-admin/api-admin-donation";
|
||||||
import {
|
|
||||||
apiAdminDonationDetailById,
|
|
||||||
apiAdminDonationDisbursementOfFundsCreated,
|
|
||||||
} from "@/service/api-admin/api-admin-donation";
|
|
||||||
import { uploadFileService } from "@/service/upload-service";
|
import { uploadFileService } from "@/service/upload-service";
|
||||||
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
||||||
import pickFile from "@/utils/pickFile";
|
import pickFile from "@/utils/pickFile";
|
||||||
@@ -29,7 +25,7 @@ import Toast from "react-native-toast-message";
|
|||||||
|
|
||||||
export default function AdminDonationDisbursementOfFunds() {
|
export default function AdminDonationDisbursementOfFunds() {
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
const { user } = useAuth();
|
|
||||||
const [data, setData] = React.useState<any | null>(null);
|
const [data, setData] = React.useState<any | null>(null);
|
||||||
const [isLoading, setIsLoading] = React.useState(false);
|
const [isLoading, setIsLoading] = React.useState(false);
|
||||||
|
|
||||||
@@ -44,7 +40,7 @@ export default function AdminDonationDisbursementOfFunds() {
|
|||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
React.useCallback(() => {
|
React.useCallback(() => {
|
||||||
onLoadData();
|
onLoadData();
|
||||||
}, [id]),
|
}, [id])
|
||||||
);
|
);
|
||||||
|
|
||||||
const onLoadData = async () => {
|
const onLoadData = async () => {
|
||||||
@@ -98,7 +94,6 @@ export default function AdminDonationDisbursementOfFunds() {
|
|||||||
|
|
||||||
const newData = {
|
const newData = {
|
||||||
...value,
|
...value,
|
||||||
authorId: user?.id,
|
|
||||||
imageId: imageId,
|
imageId: imageId,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import { funUpdateStatusDonation } from "@/screens/Admin/Donation/funDonationUpdateStatus";
|
import { funUpdateStatusDonation } from "@/screens/Admin/Donation/funDonationUpdateStatus";
|
||||||
import { apiAdminDonationDetailById } from "@/service/api-admin/api-admin-donation";
|
import {
|
||||||
|
apiAdminDonationDetailById
|
||||||
|
} from "@/service/api-admin/api-admin-donation";
|
||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminDonationRejectInput() {
|
export default function AdminDonationRejectInput() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
|
|
||||||
const [data, setData] = React.useState<any | null>(null);
|
const [data, setData] = React.useState<any | null>(null);
|
||||||
@@ -24,7 +24,7 @@ export default function AdminDonationRejectInput() {
|
|||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
React.useCallback(() => {
|
React.useCallback(() => {
|
||||||
onLoadData();
|
onLoadData();
|
||||||
}, [id]),
|
}, [id])
|
||||||
);
|
);
|
||||||
|
|
||||||
const onLoadData = async () => {
|
const onLoadData = async () => {
|
||||||
@@ -48,23 +48,11 @@ export default function AdminDonationRejectInput() {
|
|||||||
changeStatus: "publish" | "review" | "reject";
|
changeStatus: "publish" | "review" | "reject";
|
||||||
}) => {
|
}) => {
|
||||||
try {
|
try {
|
||||||
if (!user?.id) {
|
|
||||||
Toast.show({
|
|
||||||
type: "error",
|
|
||||||
text1: "User tidak ditemukan",
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
const response = await funUpdateStatusDonation({
|
const response = await funUpdateStatusDonation({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
changeStatus,
|
changeStatus,
|
||||||
data: {
|
data: data,
|
||||||
senderId: user?.id as string,
|
|
||||||
catatan: data,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
@@ -73,7 +61,7 @@ export default function AdminDonationRejectInput() {
|
|||||||
text1: "Report gagal",
|
text1: "Report gagal",
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
Toast.show({
|
Toast.show({
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ export default function AdminEventDetail() {
|
|||||||
const deepLinkURL = `${DEEP_LINK_URL}/event/${id}/confirmation?userId=${user?.id}`;
|
const deepLinkURL = `${DEEP_LINK_URL}/event/${id}/confirmation?userId=${user?.id}`;
|
||||||
const deepLinkURLDEV = `${DEEP_LINK_URL}/--/event/${id}/confirmation?userId=${user?.id}`;
|
const deepLinkURLDEV = `${DEEP_LINK_URL}/--/event/${id}/confirmation?userId=${user?.id}`;
|
||||||
|
|
||||||
const isDevLink =
|
const isDevLink = process.env.NODE_ENV === "development" ? deepLinkURLDEV : deepLinkURL;
|
||||||
process.env.NODE_ENV === "development" ? deepLinkURLDEV : deepLinkURL;
|
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
@@ -126,7 +126,6 @@ export default function AdminEventDetail() {
|
|||||||
const response = await funUpdateStatusEvent({
|
const response = await funUpdateStatusEvent({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
changeStatus: "publish",
|
changeStatus: "publish",
|
||||||
data: { catatan: "", senderId: user?.id as string },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import { funUpdateStatusEvent } from "@/screens/Admin/Event/funUpdateStatus";
|
import { funUpdateStatusEvent } from "@/screens/Admin/Event/funUpdateStatus";
|
||||||
import { apiAdminEventById } from "@/service/api-admin/api-admin-event";
|
import { apiAdminEventById } from "@/service/api-admin/api-admin-event";
|
||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
@@ -15,13 +14,9 @@ import { useCallback, useState } from "react";
|
|||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminEventRejectInput() {
|
export default function AdminEventRejectInput() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
|
|
||||||
const [data, setData] = useState<any>({
|
const [data, setData] = useState<any>("");
|
||||||
catatan: "",
|
|
||||||
senderId: "",
|
|
||||||
});
|
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
@@ -50,16 +45,10 @@ export default function AdminEventRejectInput() {
|
|||||||
}) => {
|
}) => {
|
||||||
try {
|
try {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|
||||||
const newData = {
|
|
||||||
catatan: data,
|
|
||||||
senderId: user?.id as string,
|
|
||||||
};
|
|
||||||
|
|
||||||
const response = await funUpdateStatusEvent({
|
const response = await funUpdateStatusEvent({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
changeStatus,
|
changeStatus,
|
||||||
data: newData,
|
data: data,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
|
|||||||
@@ -15,11 +15,12 @@ import { IconDot, IconView } from "@/components/_Icon/IconComponent";
|
|||||||
import { IconTrash } from "@/components/_Icon/IconTrash";
|
import { IconTrash } from "@/components/_Icon/IconTrash";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
||||||
|
import AdminTitleTable from "@/components/_ShareComponent/Admin/TableTitle";
|
||||||
|
import AdminTableValue from "@/components/_ShareComponent/Admin/TableValue";
|
||||||
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
import { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
import { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import {
|
import {
|
||||||
apiAdminForumCommentById,
|
apiAdminForumCommentById,
|
||||||
apiAdminForumDeactivateComment,
|
apiAdminForumDeactivateComment,
|
||||||
@@ -34,7 +35,6 @@ import Toast from "react-native-toast-message";
|
|||||||
|
|
||||||
export default function AdminForumReportComment() {
|
export default function AdminForumReportComment() {
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
const { user } = useAuth();
|
|
||||||
const [data, setData] = useState<any | null>(null);
|
const [data, setData] = useState<any | null>(null);
|
||||||
const [listReport, setListReport] = useState<any[] | null>(null);
|
const [listReport, setListReport] = useState<any[] | null>(null);
|
||||||
const [loadList, setLoadList] = useState(false);
|
const [loadList, setLoadList] = useState(false);
|
||||||
@@ -113,11 +113,7 @@ export default function AdminForumReportComment() {
|
|||||||
|
|
||||||
<StackCustom gap={"sm"}>
|
<StackCustom gap={"sm"}>
|
||||||
<GridSpan_NewComponent
|
<GridSpan_NewComponent
|
||||||
text1={
|
text1={<TextCustom bold align="center">Aksi</TextCustom>}
|
||||||
<TextCustom bold align="center">
|
|
||||||
Aksi
|
|
||||||
</TextCustom>
|
|
||||||
}
|
|
||||||
text2={<TextCustom bold>Pelapor</TextCustom>}
|
text2={<TextCustom bold>Pelapor</TextCustom>}
|
||||||
text3={<TextCustom bold>Kategori Report</TextCustom>}
|
text3={<TextCustom bold>Kategori Report</TextCustom>}
|
||||||
/>
|
/>
|
||||||
@@ -135,9 +131,7 @@ export default function AdminForumReportComment() {
|
|||||||
text1={
|
text1={
|
||||||
<CenterCustom>
|
<CenterCustom>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
icon={
|
icon={<IconView size={ICON_SIZE_BUTTON} color="black" />}
|
||||||
<IconView size={ICON_SIZE_BUTTON} color="black" />
|
|
||||||
}
|
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setOpenDrawerAction(true);
|
setOpenDrawerAction(true);
|
||||||
setSelectedReport({
|
setSelectedReport({
|
||||||
@@ -194,18 +188,15 @@ export default function AdminForumReportComment() {
|
|||||||
onPressRight: async () => {
|
onPressRight: async () => {
|
||||||
const deleteComment = await apiAdminForumDeactivateComment({
|
const deleteComment = await apiAdminForumDeactivateComment({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
data: {
|
|
||||||
senderId: user?.id as string,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (!deleteComment.success) {
|
if (!deleteComment.success) {
|
||||||
// Toast.show({
|
Toast.show({
|
||||||
// type: "error",
|
type: "error",
|
||||||
// text1: "Komentar gagal dihapus",
|
text1: "Komentar gagal dihapus",
|
||||||
// });
|
});
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
setOpenDrawer(false);
|
setOpenDrawer(false);
|
||||||
Toast.show({
|
Toast.show({
|
||||||
|
|||||||
@@ -16,11 +16,12 @@ import { IconDot, IconView } from "@/components/_Icon/IconComponent";
|
|||||||
import { IconTrash } from "@/components/_Icon/IconTrash";
|
import { IconTrash } from "@/components/_Icon/IconTrash";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
||||||
|
import AdminTitleTable from "@/components/_ShareComponent/Admin/TableTitle";
|
||||||
|
import AdminTableValue from "@/components/_ShareComponent/Admin/TableValue";
|
||||||
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
import { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
import { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import {
|
import {
|
||||||
apiAdminForumDeactivatePosting,
|
apiAdminForumDeactivatePosting,
|
||||||
apiAdminForumListReportPostingById,
|
apiAdminForumListReportPostingById,
|
||||||
@@ -34,7 +35,6 @@ import { Divider } from "react-native-paper";
|
|||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminForumReportPosting() {
|
export default function AdminForumReportPosting() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
const [openDrawerPage, setOpenDrawerPage] = useState(false);
|
const [openDrawerPage, setOpenDrawerPage] = useState(false);
|
||||||
const [openDrawerAction, setOpenDrawerAction] = useState(false);
|
const [openDrawerAction, setOpenDrawerAction] = useState(false);
|
||||||
@@ -215,9 +215,6 @@ export default function AdminForumReportPosting() {
|
|||||||
onPressRight: async () => {
|
onPressRight: async () => {
|
||||||
const response = await apiAdminForumDeactivatePosting({
|
const response = await apiAdminForumDeactivatePosting({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
data: {
|
|
||||||
senderId: user?.id as string,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export default function AdminForumReportPosting() {
|
|||||||
<GridSpan_NewComponent
|
<GridSpan_NewComponent
|
||||||
text1={
|
text1={
|
||||||
<TextCustom bold truncate>
|
<TextCustom bold truncate>
|
||||||
Pelapor
|
Username
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
}
|
}
|
||||||
text2={
|
text2={
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButt
|
|||||||
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
||||||
import AdminButtonReview from "@/components/_ShareComponent/Admin/ButtonReview";
|
import AdminButtonReview from "@/components/_ShareComponent/Admin/ButtonReview";
|
||||||
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
import CustomSkeleton from "@/components/_ShareComponent/SkeletonCustom";
|
|
||||||
import ReportBox from "@/components/Box/ReportBox";
|
import ReportBox from "@/components/Box/ReportBox";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
@@ -29,7 +28,6 @@ import {
|
|||||||
apiAdminInvestmentDetailById,
|
apiAdminInvestmentDetailById,
|
||||||
} from "@/service/api-admin/api-admin-investment";
|
} from "@/service/api-admin/api-admin-investment";
|
||||||
import { colorBadgeStatus } from "@/utils/colorBadge";
|
import { colorBadgeStatus } from "@/utils/colorBadge";
|
||||||
import { countDownAndCondition } from "@/utils/countDownAndCondition";
|
|
||||||
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
@@ -42,41 +40,91 @@ export default function AdminInvestmentDetail() {
|
|||||||
|
|
||||||
const [data, setData] = React.useState<any | null>(null);
|
const [data, setData] = React.useState<any | null>(null);
|
||||||
const [isLoading, setLoading] = React.useState(false);
|
const [isLoading, setLoading] = React.useState(false);
|
||||||
const [remind, setRemind] = React.useState({
|
|
||||||
sisa: 0,
|
|
||||||
reminder: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
React.useCallback(() => {
|
React.useCallback(() => {
|
||||||
onLoadData();
|
onLoadData();
|
||||||
}, [id]),
|
}, [id])
|
||||||
);
|
);
|
||||||
|
|
||||||
const onLoadData = async () => {
|
const onLoadData = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await apiAdminInvestmentDetailById({ id: id as string });
|
const response = await apiAdminInvestmentDetailById({ id: id as string });
|
||||||
|
// console.log("[GETONE INVEST]", JSON.stringify(response, null, 2));
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
setData(response.data);
|
setData(response.data);
|
||||||
|
|
||||||
const duration = response?.data?.MasterPencarianInvestor?.name;
|
|
||||||
const publishTime = response?.data?.countDown;
|
|
||||||
|
|
||||||
const countDown = countDownAndCondition({
|
|
||||||
duration: duration,
|
|
||||||
publishTime: publishTime
|
|
||||||
});
|
|
||||||
|
|
||||||
setRemind({
|
|
||||||
sisa: countDown.durationDay,
|
|
||||||
reminder: countDown.reminder,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error", error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const listData = [
|
||||||
|
{
|
||||||
|
label: "Username",
|
||||||
|
value: (data && data?.author?.username) || "-",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Judul",
|
||||||
|
value: (data && data?.title) || "-",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Status",
|
||||||
|
value:
|
||||||
|
data && data?.MasterStatusInvestasi?.name ? (
|
||||||
|
<BadgeCustom
|
||||||
|
color={colorBadgeStatus({
|
||||||
|
status: data?.MasterStatusInvestasi?.name as string,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{_.startCase(data?.MasterStatusInvestasi?.name as string)}
|
||||||
|
</BadgeCustom>
|
||||||
|
) : (
|
||||||
|
"-"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Dana Dibutuhkan",
|
||||||
|
value: `Rp. ${
|
||||||
|
(data && data?.targetDana && formatCurrencyDisplay(data?.targetDana)) ||
|
||||||
|
"-"
|
||||||
|
}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Harga Perlembar",
|
||||||
|
value: `Rp. ${
|
||||||
|
(data &&
|
||||||
|
data?.hargaLembar &&
|
||||||
|
formatCurrencyDisplay(data?.hargaLembar)) ||
|
||||||
|
"-"
|
||||||
|
}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Total Lembar",
|
||||||
|
value:
|
||||||
|
(data &&
|
||||||
|
data?.totalLembar &&
|
||||||
|
formatCurrencyDisplay(data?.totalLembar)) ||
|
||||||
|
"-",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "ROI",
|
||||||
|
value: `${(data && data?.roi && data?.roi) || 0} %`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Pembagian Deviden",
|
||||||
|
value: (data && data?.MasterPembagianDeviden?.name) + " bulan" || "-",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Jadwal Pembagian",
|
||||||
|
value: (data && data?.MasterPeriodeDeviden?.name) || "-",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Pencarian Investor",
|
||||||
|
value: (data && data?.MasterPencarianInvestor?.name) + " hari" || "-",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const handlerSubmitPublish = async () => {
|
const handlerSubmitPublish = async () => {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
@@ -86,6 +134,7 @@ export default function AdminInvestmentDetail() {
|
|||||||
data: data,
|
data: data,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// console.log("[GET ON INVEST]", JSON.stringify(response, null, 2));
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
type: "error",
|
type: "error",
|
||||||
@@ -115,16 +164,6 @@ export default function AdminInvestmentDetail() {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!data) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ViewWrapper>
|
|
||||||
<CustomSkeleton height={200} />
|
|
||||||
</ViewWrapper>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper
|
<ViewWrapper
|
||||||
@@ -138,8 +177,8 @@ export default function AdminInvestmentDetail() {
|
|||||||
{status === "publish" && (
|
{status === "publish" && (
|
||||||
<BaseBox>
|
<BaseBox>
|
||||||
<ProgressCustom
|
<ProgressCustom
|
||||||
label={(data && `${data.progress}%`) || "0%"}
|
label={data && `${data.progress}%` || "0%"}
|
||||||
value={(data && data.progress) || 0}
|
value={data && data.progress || 0}
|
||||||
size="lg"
|
size="lg"
|
||||||
/>
|
/>
|
||||||
<Spacing />
|
<Spacing />
|
||||||
@@ -148,8 +187,7 @@ export default function AdminInvestmentDetail() {
|
|||||||
label={<TextCustom bold>Sisa Saham</TextCustom>}
|
label={<TextCustom bold>Sisa Saham</TextCustom>}
|
||||||
value={
|
value={
|
||||||
<TextCustom>
|
<TextCustom>
|
||||||
{data && formatCurrencyDisplay(data && data?.sisaLembar)}{" "}
|
{data && formatCurrencyDisplay(data && data?.sisaLembar)} lembar
|
||||||
lembar
|
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@@ -168,15 +206,13 @@ export default function AdminInvestmentDetail() {
|
|||||||
<BaseBox>
|
<BaseBox>
|
||||||
<StackCustom>
|
<StackCustom>
|
||||||
<DummyLandscapeImage imageId={data?.imageId} />
|
<DummyLandscapeImage imageId={data?.imageId} />
|
||||||
{listData({ data: data, reminder: remind.reminder })?.map(
|
{listData.map((item, i) => (
|
||||||
(item, i) => (
|
|
||||||
<GridSpan_4_8
|
<GridSpan_4_8
|
||||||
key={i}
|
key={i}
|
||||||
label={<TextCustom bold>{item.label}</TextCustom>}
|
label={<TextCustom bold>{item.label}</TextCustom>}
|
||||||
value={<TextCustom>{item.value}</TextCustom>}
|
value={<TextCustom>{item.value}</TextCustom>}
|
||||||
/>
|
/>
|
||||||
),
|
))}
|
||||||
)}
|
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|
||||||
@@ -194,7 +230,7 @@ export default function AdminInvestmentDetail() {
|
|||||||
}
|
}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
router.push(
|
router.push(
|
||||||
`/(application)/(file)/${data?.prospektusFileId}`,
|
`/(application)/(file)/${data?.prospektusFileId}`
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -223,7 +259,7 @@ export default function AdminInvestmentDetail() {
|
|||||||
}
|
}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
router.push(
|
router.push(
|
||||||
`/(application)/(file)/${item?.fileId}`,
|
`/(application)/(file)/${item?.fileId}`
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -263,8 +299,8 @@ export default function AdminInvestmentDetail() {
|
|||||||
onReject={() => {
|
onReject={() => {
|
||||||
router.push(
|
router.push(
|
||||||
`/admin/investment/${id}/reject-input?status=${_.lowerCase(
|
`/admin/investment/${id}/reject-input?status=${_.lowerCase(
|
||||||
data?.MasterStatusInvestasi?.name,
|
data?.MasterStatusInvestasi?.name
|
||||||
)}`,
|
)}`
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -307,67 +343,3 @@ export default function AdminInvestmentDetail() {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const listData = ({ data, reminder }: { data: any; reminder: boolean }) => [
|
|
||||||
{
|
|
||||||
label: "Username",
|
|
||||||
value: (data && data?.author?.username) || "-",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Judul",
|
|
||||||
value: (data && data?.title) || "-",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Status",
|
|
||||||
value:
|
|
||||||
data && data?.MasterStatusInvestasi?.name ? (
|
|
||||||
<BadgeCustom
|
|
||||||
color={colorBadgeStatus({
|
|
||||||
status: reminder ? "periode berakhir" : "publish",
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{reminder
|
|
||||||
? "Periode Berakhir"
|
|
||||||
: _.startCase(data?.MasterStatusInvestasi?.name as string)}
|
|
||||||
</BadgeCustom>
|
|
||||||
) : (
|
|
||||||
"-"
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Dana Dibutuhkan",
|
|
||||||
value: `Rp. ${
|
|
||||||
(data && data?.targetDana && formatCurrencyDisplay(data?.targetDana)) ||
|
|
||||||
"-"
|
|
||||||
}`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Harga Perlembar",
|
|
||||||
value: `Rp. ${
|
|
||||||
(data && data?.hargaLembar && formatCurrencyDisplay(data?.hargaLembar)) ||
|
|
||||||
"-"
|
|
||||||
}`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Total Lembar",
|
|
||||||
value:
|
|
||||||
(data && data?.totalLembar && formatCurrencyDisplay(data?.totalLembar)) ||
|
|
||||||
"-",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "ROI",
|
|
||||||
value: `${(data && data?.roi && data?.roi) || 0} %`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Pembagian Deviden",
|
|
||||||
value: (data && data?.MasterPembagianDeviden?.name) + " bulan" || "-",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Jadwal Pembagian",
|
|
||||||
value: (data && data?.MasterPeriodeDeviden?.name) || "-",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Pencarian Investor",
|
|
||||||
value: (data && data?.MasterPencarianInvestor?.name) + " hari" || "-",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButt
|
|||||||
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
import GridTwoView from "@/components/_ShareComponent/GridTwoView";
|
import GridTwoView from "@/components/_ShareComponent/GridTwoView";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import {
|
import {
|
||||||
apiAdminInvestmentGetOneInvoiceById,
|
apiAdminInvestmentGetOneInvoiceById,
|
||||||
apiAdminInvestmentUpdateInvoice,
|
apiAdminInvestmentUpdateInvoice,
|
||||||
@@ -26,7 +25,6 @@ import { useCallback, useState } from "react";
|
|||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminInvestmentTransactionDetail() {
|
export default function AdminInvestmentTransactionDetail() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
const [data, setData] = useState<any | null>(null);
|
const [data, setData] = useState<any | null>(null);
|
||||||
const [isLoading, setLoading] = useState<boolean>(false);
|
const [isLoading, setLoading] = useState<boolean>(false);
|
||||||
@@ -34,7 +32,7 @@ export default function AdminInvestmentTransactionDetail() {
|
|||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
onLoadData();
|
onLoadData();
|
||||||
}, [id]),
|
}, [id])
|
||||||
);
|
);
|
||||||
|
|
||||||
const onLoadData = async () => {
|
const onLoadData = async () => {
|
||||||
@@ -42,6 +40,7 @@ export default function AdminInvestmentTransactionDetail() {
|
|||||||
const response = await apiAdminInvestmentGetOneInvoiceById({
|
const response = await apiAdminInvestmentGetOneInvoiceById({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
});
|
});
|
||||||
|
// console.log("[RESPONSE]", JSON.stringify(response, null, 2));
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
setData(response.data);
|
setData(response.data);
|
||||||
}
|
}
|
||||||
@@ -93,7 +92,7 @@ export default function AdminInvestmentTransactionDetail() {
|
|||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
onPress={() =>
|
onPress={() =>
|
||||||
router.push(
|
router.push(
|
||||||
`/(application)/(image)/preview-image/${data?.imageId}`,
|
`/(application)/(image)/preview-image/${data?.imageId}`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@@ -110,13 +109,6 @@ export default function AdminInvestmentTransactionDetail() {
|
|||||||
}: {
|
}: {
|
||||||
category: "accept" | "deny";
|
category: "accept" | "deny";
|
||||||
}) => {
|
}) => {
|
||||||
if (!user?.id) {
|
|
||||||
Toast.show({
|
|
||||||
type: "error",
|
|
||||||
text1: "Gagal update status transaksi",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const response = await apiAdminInvestmentUpdateInvoice({
|
const response = await apiAdminInvestmentUpdateInvoice({
|
||||||
@@ -125,10 +117,11 @@ export default function AdminInvestmentTransactionDetail() {
|
|||||||
data: {
|
data: {
|
||||||
investasiId: data?.investasiId,
|
investasiId: data?.investasiId,
|
||||||
lembarTerbeli: data?.lembarTerbeli,
|
lembarTerbeli: data?.lembarTerbeli,
|
||||||
senderId: user?.id as any,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// console.log("[RESPONSE SUBMIT]", JSON.stringify(response, null, 2));
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
type: "error",
|
type: "error",
|
||||||
@@ -160,7 +153,6 @@ export default function AdminInvestmentTransactionDetail() {
|
|||||||
styleRight={{ paddingLeft: 10 }}
|
styleRight={{ paddingLeft: 10 }}
|
||||||
leftIcon={
|
leftIcon={
|
||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
disabled={isLoading}
|
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
backgroundColor={MainColor.red}
|
backgroundColor={MainColor.red}
|
||||||
textColor="white"
|
textColor="white"
|
||||||
@@ -183,7 +175,6 @@ export default function AdminInvestmentTransactionDetail() {
|
|||||||
}
|
}
|
||||||
rightIcon={
|
rightIcon={
|
||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
disabled={isLoading}
|
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
AlertDefaultSystem({
|
AlertDefaultSystem({
|
||||||
@@ -207,8 +198,8 @@ export default function AdminInvestmentTransactionDetail() {
|
|||||||
} else if (data?.StatusInvoice?.name === "Gagal") {
|
} else if (data?.StatusInvoice?.name === "Gagal") {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ButtonCustom disabled onPress={() => router.back()}>
|
<ButtonCustom textColor="red" onPress={() => router.back()}>
|
||||||
Transaksi telah gagal
|
Gagal
|
||||||
</ButtonCustom>
|
</ButtonCustom>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,21 +7,16 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { apiAdminInvestasiUpdateByStatus, apiAdminInvestmentDetailById } from "@/service/api-admin/api-admin-investment";
|
||||||
import {
|
|
||||||
apiAdminInvestasiUpdateByStatus,
|
|
||||||
apiAdminInvestmentDetailById,
|
|
||||||
} from "@/service/api-admin/api-admin-investment";
|
|
||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminInvestmentRejectInput() {
|
export default function AdminInvestmentRejectInput() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
console.log("[STATUS]", status);
|
console.log("[STATUS]", status);
|
||||||
const [value, setValue] = useState<any | null>(null);
|
const [value, setValue] = useState<any | null>(null);
|
||||||
const [isLoading, setLoading] = useState(false);
|
const [isLoading , setLoading] = useState(false)
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
@@ -50,23 +45,12 @@ export default function AdminInvestmentRejectInput() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user?.id) {
|
|
||||||
Toast.show({
|
|
||||||
type: "error",
|
|
||||||
text1: "User tidak ditemukan",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true)
|
||||||
const response = await apiAdminInvestasiUpdateByStatus({
|
const response = await apiAdminInvestasiUpdateByStatus({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
status: "reject",
|
status: "reject",
|
||||||
data: {
|
data: value,
|
||||||
catatan: value,
|
|
||||||
senderId: user?.id as string,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("[RESPONSE]", JSON.stringify(response, null, 2));
|
console.log("[RESPONSE]", JSON.stringify(response, null, 2));
|
||||||
@@ -92,7 +76,7 @@ export default function AdminInvestmentRejectInput() {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(["ERROR"], error);
|
console.error(["ERROR"], error);
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import { Divider } from "react-native-paper";
|
|||||||
|
|
||||||
export default function AdminInvestmentStatus() {
|
export default function AdminInvestmentStatus() {
|
||||||
const { status } = useLocalSearchParams();
|
const { status } = useLocalSearchParams();
|
||||||
|
console.log("[STATUS]", status);
|
||||||
|
|
||||||
const [listData, setListData] = React.useState<any[] | null>(null);
|
const [listData, setListData] = React.useState<any[] | null>(null);
|
||||||
const [loadData, setLoadingData] = React.useState(false);
|
const [loadData, setLoadingData] = React.useState(false);
|
||||||
const [search, setSearch] = React.useState("");
|
const [search, setSearch] = React.useState("");
|
||||||
@@ -39,7 +41,7 @@ export default function AdminInvestmentStatus() {
|
|||||||
category: status as "publish" | "review" | "reject",
|
category: status as "publish" | "review" | "reject",
|
||||||
search,
|
search,
|
||||||
});
|
});
|
||||||
|
console.log("[LIST DATA]", JSON.stringify(response, null, 2));
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
setListData(response.data);
|
setListData(response.data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
|||||||
import AdminButtonReview from "@/components/_ShareComponent/Admin/ButtonReview";
|
import AdminButtonReview from "@/components/_ShareComponent/Admin/ButtonReview";
|
||||||
import ReportBox from "@/components/Box/ReportBox";
|
import ReportBox from "@/components/Box/ReportBox";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import funUpdateStatusJob from "@/screens/Admin/Job/funUpdateStatus";
|
import funUpdateStatusJob from "@/screens/Admin/Job/funUpdateStatus";
|
||||||
import { apiAdminJobGetById } from "@/service/api-admin/api-admin-job";
|
import { apiAdminJobGetById } from "@/service/api-admin/api-admin-job";
|
||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
@@ -24,10 +23,8 @@ import { useCallback, useState } from "react";
|
|||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminJobDetailStatus() {
|
export default function AdminJobDetailStatus() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
const [data, setData] = useState<any | null>(null);
|
const [data, setData] = useState<any | null>(null);
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
@@ -95,9 +92,6 @@ export default function AdminJobDetailStatus() {
|
|||||||
const response = await funUpdateStatusJob({
|
const response = await funUpdateStatusJob({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
changeStatus,
|
changeStatus,
|
||||||
data: {
|
|
||||||
senderId: user?.id as string,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
@@ -148,15 +142,12 @@ export default function AdminJobDetailStatus() {
|
|||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|
||||||
{data &&
|
{data && data?.catatan && (status === "reject" || status === "review") && (
|
||||||
data?.catatan &&
|
|
||||||
(status === "reject" || status === "review") && (
|
|
||||||
<ReportBox text={data?.catatan}/>
|
<ReportBox text={data?.catatan}/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{status === "review" && (
|
{status === "review" && (
|
||||||
<AdminButtonReview
|
<AdminButtonReview
|
||||||
isLoading={isLoading}
|
|
||||||
onPublish={() => {
|
onPublish={() => {
|
||||||
AlertDefaultSystem({
|
AlertDefaultSystem({
|
||||||
title: "Publish",
|
title: "Publish",
|
||||||
@@ -165,7 +156,6 @@ export default function AdminJobDetailStatus() {
|
|||||||
textRight: "Ya",
|
textRight: "Ya",
|
||||||
onPressRight: () => {
|
onPressRight: () => {
|
||||||
handleUpdate({ changeStatus: "publish" });
|
handleUpdate({ changeStatus: "publish" });
|
||||||
setIsLoading(true);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -15,10 +15,7 @@ import Toast from "react-native-toast-message";
|
|||||||
|
|
||||||
export default function AdminJobRejectInput() {
|
export default function AdminJobRejectInput() {
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
const [data, setData] = useState({
|
const [data, setData] = useState<any | null>(null);
|
||||||
catatan: "",
|
|
||||||
senderId: ""
|
|
||||||
});
|
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
@@ -105,8 +102,8 @@ export default function AdminJobRejectInput() {
|
|||||||
headerComponent={<AdminBackButtonAntTitle title="Penolakan Job" />}
|
headerComponent={<AdminBackButtonAntTitle title="Penolakan Job" />}
|
||||||
>
|
>
|
||||||
<TextAreaCustom
|
<TextAreaCustom
|
||||||
value={data?.catatan}
|
value={data}
|
||||||
onChangeText={(text) => setData({ ...data, catatan: text })}
|
onChangeText={setData}
|
||||||
placeholder="Masukan alasan"
|
placeholder="Masukan alasan"
|
||||||
required
|
required
|
||||||
showCount
|
showCount
|
||||||
|
|||||||
@@ -1,213 +1,20 @@
|
|||||||
import {
|
import { BackButton, TextCustom, ViewWrapper } from "@/components";
|
||||||
AlertDefaultSystem,
|
import { Stack } from "expo-router";
|
||||||
BackButton,
|
|
||||||
BaseBox,
|
|
||||||
DrawerCustom,
|
|
||||||
MenuDrawerDynamicGrid,
|
|
||||||
NewWrapper,
|
|
||||||
ScrollableCustom,
|
|
||||||
StackCustom,
|
|
||||||
TextCustom,
|
|
||||||
} from "@/components";
|
|
||||||
import { IconPlus } from "@/components/_Icon";
|
|
||||||
import { IconDot } from "@/components/_Icon/IconComponent";
|
|
||||||
import ListSkeletonComponent from "@/components/_ShareComponent/ListSkeletonComponent";
|
|
||||||
import NoDataText from "@/components/_ShareComponent/NoDataText";
|
|
||||||
import { AccentColor, MainColor } from "@/constants/color-palet";
|
|
||||||
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import { useNotificationStore } from "@/hooks/use-notification-store";
|
|
||||||
import { apiGetNotificationsById } from "@/service/api-notifications";
|
|
||||||
import { listOfcategoriesAppNotification } from "@/types/type-notification-category";
|
|
||||||
import { formatChatTime } from "@/utils/formatChatTime";
|
|
||||||
import { Ionicons } from "@expo/vector-icons";
|
|
||||||
import { router, Stack, useFocusEffect } from "expo-router";
|
|
||||||
import _ from "lodash";
|
|
||||||
import { useCallback, useState } from "react";
|
|
||||||
import { RefreshControl, View } from "react-native";
|
|
||||||
|
|
||||||
const selectedCategory = (value: string) => {
|
|
||||||
const category = listOfcategoriesAppNotification.find(
|
|
||||||
(c) => c.value === value
|
|
||||||
);
|
|
||||||
return category?.label;
|
|
||||||
};
|
|
||||||
|
|
||||||
const BoxNotification = ({
|
|
||||||
data,
|
|
||||||
activeCategory,
|
|
||||||
}: {
|
|
||||||
data: any;
|
|
||||||
activeCategory: string | null;
|
|
||||||
}) => {
|
|
||||||
const { markAsRead } = useNotificationStore();
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<BaseBox
|
|
||||||
backgroundColor={data.isRead ? AccentColor.darkblue : AccentColor.blue}
|
|
||||||
onPress={() => {
|
|
||||||
console.log(
|
|
||||||
"Notification >",
|
|
||||||
selectedCategory(activeCategory as string)
|
|
||||||
);
|
|
||||||
router.push(data.deepLink);
|
|
||||||
markAsRead(data.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<StackCustom>
|
|
||||||
<TextCustom truncate={2} bold>
|
|
||||||
{data.title}
|
|
||||||
</TextCustom>
|
|
||||||
|
|
||||||
<TextCustom truncate={2}>{data.pesan}</TextCustom>
|
|
||||||
|
|
||||||
<TextCustom size="small" color="gray">
|
|
||||||
{formatChatTime(data.createdAt)}
|
|
||||||
</TextCustom>
|
|
||||||
</StackCustom>
|
|
||||||
</BaseBox>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function AdminNotification() {
|
export default function AdminNotification() {
|
||||||
const { user } = useAuth();
|
|
||||||
const [activeCategory, setActiveCategory] = useState<string | null>("event");
|
|
||||||
const [listData, setListData] = useState<any[]>([]);
|
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
const [openDrawer, setOpenDrawer] = useState(false);
|
|
||||||
|
|
||||||
const { markAsReadAll } = useNotificationStore();
|
|
||||||
|
|
||||||
const handlePress = (item: any) => {
|
|
||||||
setActiveCategory(item.value);
|
|
||||||
// tambahkan logika lain seperti filter dsb.
|
|
||||||
};
|
|
||||||
|
|
||||||
useFocusEffect(
|
|
||||||
useCallback(() => {
|
|
||||||
fecthData();
|
|
||||||
}, [activeCategory])
|
|
||||||
);
|
|
||||||
|
|
||||||
const fecthData = async () => {
|
|
||||||
try {
|
|
||||||
setLoading(true);
|
|
||||||
const response = await apiGetNotificationsById({
|
|
||||||
id: user?.id as any,
|
|
||||||
category: activeCategory as any,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (response.success) {
|
|
||||||
setListData(response.data);
|
|
||||||
} else {
|
|
||||||
setListData([]);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log("Error Notification", error);
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const onRefresh = () => {
|
|
||||||
setRefreshing(true);
|
|
||||||
fecthData();
|
|
||||||
setRefreshing(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
options={{
|
options={{
|
||||||
title: "Admin Notifikasi",
|
title: "Admin Notifikasi",
|
||||||
headerLeft: () => <BackButton />,
|
headerLeft: () => <BackButton />,
|
||||||
headerRight: () => (
|
headerRight: () => <></>,
|
||||||
<IconDot
|
|
||||||
color={MainColor.yellow}
|
|
||||||
onPress={() => setOpenDrawer(true)}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<NewWrapper
|
<ViewWrapper>
|
||||||
headerComponent={
|
<TextCustom>Notification</TextCustom>
|
||||||
<ScrollableCustom
|
</ViewWrapper>
|
||||||
data={listOfcategoriesAppNotification.map((e, i) => ({
|
|
||||||
id: i,
|
|
||||||
label: e.label,
|
|
||||||
value: e.value,
|
|
||||||
}))}
|
|
||||||
onButtonPress={handlePress}
|
|
||||||
activeId={activeCategory as string}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
refreshControl={
|
|
||||||
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{loading ? (
|
|
||||||
<ListSkeletonComponent />
|
|
||||||
) : _.isEmpty(listData) ? (
|
|
||||||
<NoDataText text="Belum ada notifikasi" />
|
|
||||||
) : (
|
|
||||||
listData.map((e, i) => (
|
|
||||||
<View key={i}>
|
|
||||||
<BoxNotification
|
|
||||||
data={e}
|
|
||||||
activeCategory={activeCategory as any}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
))
|
|
||||||
)}
|
|
||||||
</NewWrapper>
|
|
||||||
|
|
||||||
<DrawerCustom
|
|
||||||
isVisible={openDrawer}
|
|
||||||
closeDrawer={() => setOpenDrawer(false)}
|
|
||||||
height={"auto"}
|
|
||||||
>
|
|
||||||
<MenuDrawerDynamicGrid
|
|
||||||
data={[
|
|
||||||
{
|
|
||||||
label: "Tandai Semua Dibaca",
|
|
||||||
value: "read-all",
|
|
||||||
icon: (
|
|
||||||
<Ionicons
|
|
||||||
name="reader-outline"
|
|
||||||
size={ICON_SIZE_SMALL}
|
|
||||||
color={MainColor.white}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
path: "",
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
onPressItem={(item: any) => {
|
|
||||||
console.log("Item", item.value);
|
|
||||||
if (item.value === "read-all") {
|
|
||||||
AlertDefaultSystem({
|
|
||||||
title: "Tandai Semua Dibaca",
|
|
||||||
message:
|
|
||||||
"Apakah Anda yakin ingin menandai semua notifikasi dibaca?",
|
|
||||||
textLeft: "Batal",
|
|
||||||
textRight: "Ya",
|
|
||||||
onPressRight: () => {
|
|
||||||
markAsReadAll(user?.id as any);
|
|
||||||
const data = _.cloneDeep(listData);
|
|
||||||
data.forEach((e) => {
|
|
||||||
e.isRead = true;
|
|
||||||
});
|
|
||||||
setListData(data);
|
|
||||||
onRefresh();
|
|
||||||
setOpenDrawer(false);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</DrawerCustom>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ export default function SuperAdminDetail() {
|
|||||||
const response = await apiAdminUserAccessUpdateStatus({
|
const response = await apiAdminUserAccessUpdateStatus({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
role: data?.masterUserRoleId === "2" ? "user" : "admin",
|
role: data?.masterUserRoleId === "2" ? "user" : "admin",
|
||||||
category: "role"
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import GridTwoView from "@/components/_ShareComponent/GridTwoView";
|
import GridTwoView from "@/components/_ShareComponent/GridTwoView";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import {
|
import {
|
||||||
apiAdminUserAccessGetById,
|
apiAdminUserAccessGetById,
|
||||||
apiAdminUserAccessUpdateStatus,
|
apiAdminUserAccessUpdateStatus,
|
||||||
@@ -19,7 +18,6 @@ import { useCallback, useState } from "react";
|
|||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminUserAccessDetail() {
|
export default function AdminUserAccessDetail() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
const [data, setData] = useState<any | null>(null);
|
const [data, setData] = useState<any | null>(null);
|
||||||
const [loadData, setLoadData] = useState(false);
|
const [loadData, setLoadData] = useState(false);
|
||||||
@@ -35,7 +33,6 @@ export default function AdminUserAccessDetail() {
|
|||||||
try {
|
try {
|
||||||
setLoadData(true);
|
setLoadData(true);
|
||||||
const response = await apiAdminUserAccessGetById({ id: id as string });
|
const response = await apiAdminUserAccessGetById({ id: id as string });
|
||||||
console.log("[DATA]", JSON.stringify(response.data, null, 2));
|
|
||||||
|
|
||||||
setData(response.data);
|
setData(response.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -51,7 +48,6 @@ export default function AdminUserAccessDetail() {
|
|||||||
const response = await apiAdminUserAccessUpdateStatus({
|
const response = await apiAdminUserAccessUpdateStatus({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
active: !data?.active,
|
active: !data?.active,
|
||||||
category: "access",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
@@ -65,7 +61,6 @@ export default function AdminUserAccessDetail() {
|
|||||||
type: "success",
|
type: "success",
|
||||||
text1: "Update aktifasi berhasil ",
|
text1: "Update aktifasi berhasil ",
|
||||||
});
|
});
|
||||||
|
|
||||||
router.back();
|
router.back();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("[ERROR UPDATE STATUS]", error);
|
console.log("[ERROR UPDATE STATUS]", error);
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import AdminButtonReview from "@/components/_ShareComponent/Admin/ButtonReview";
|
|||||||
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
import ReportBox from "@/components/Box/ReportBox";
|
import ReportBox from "@/components/Box/ReportBox";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import funUpdateStatusVoting from "@/screens/Admin/Voting/funUpdateStatus";
|
import funUpdateStatusVoting from "@/screens/Admin/Voting/funUpdateStatus";
|
||||||
import { apiAdminVotingById } from "@/service/api-admin/api-admin-voting";
|
import { apiAdminVotingById } from "@/service/api-admin/api-admin-voting";
|
||||||
import { colorBadgeStatus } from "@/utils/colorBadge";
|
import { colorBadgeStatus } from "@/utils/colorBadge";
|
||||||
@@ -30,7 +29,6 @@ import { List } from "react-native-paper";
|
|||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminVotingDetail() {
|
export default function AdminVotingDetail() {
|
||||||
const { user } = useAuth();
|
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
const [data, setData] = useState<any | null>(null);
|
const [data, setData] = useState<any | null>(null);
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
@@ -141,10 +139,6 @@ export default function AdminVotingDetail() {
|
|||||||
const response = await funUpdateStatusVoting({
|
const response = await funUpdateStatusVoting({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
changeStatus,
|
changeStatus,
|
||||||
data: {
|
|
||||||
senderId: user?.id as string,
|
|
||||||
catatan: "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import funUpdateStatusVoting from "@/screens/Admin/Voting/funUpdateStatus";
|
import funUpdateStatusVoting from "@/screens/Admin/Voting/funUpdateStatus";
|
||||||
import { apiAdminVotingById } from "@/service/api-admin/api-admin-voting";
|
import { apiAdminVotingById } from "@/service/api-admin/api-admin-voting";
|
||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
@@ -15,7 +14,6 @@ import { useCallback, useState } from "react";
|
|||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminVotingRejectInput() {
|
export default function AdminVotingRejectInput() {
|
||||||
const { user } = useAuth()
|
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
const [data, setData] = useState("");
|
const [data, setData] = useState("");
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
@@ -50,10 +48,7 @@ export default function AdminVotingRejectInput() {
|
|||||||
const response = await funUpdateStatusVoting({
|
const response = await funUpdateStatusVoting({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
changeStatus,
|
changeStatus,
|
||||||
data: {
|
data: data,
|
||||||
catatan: data,
|
|
||||||
senderId: user?.id as string,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
|
|||||||
@@ -1,26 +1,16 @@
|
|||||||
import { BackButton, StackCustom, TextCustom, ViewWrapper } from "@/components";
|
import { StackCustom, TextCustom, ViewWrapper } from "@/components";
|
||||||
import { Stack } from "expo-router";
|
|
||||||
|
|
||||||
export default function NotFoundScreen() {
|
export default function NotFoundScreen() {
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<Stack.Screen
|
|
||||||
options={{ headerShown: true, title: "", headerLeft: () => <BackButton /> }}
|
|
||||||
/>
|
|
||||||
<ViewWrapper>
|
<ViewWrapper>
|
||||||
<StackCustom
|
<StackCustom align="center" gap={0} style={{justifyContent: "center", alignItems: "center", flex: 1}}>
|
||||||
align="center"
|
|
||||||
gap={0}
|
|
||||||
style={{ justifyContent: "center", alignItems: "center", flex: 1 }}
|
|
||||||
>
|
|
||||||
<TextCustom size="large" bold style={{fontSize: 100}}>
|
<TextCustom size="large" bold style={{fontSize: 100}}>
|
||||||
404
|
404
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
<TextCustom size="large" bold>
|
<TextCustom size="large" bold>
|
||||||
Sorry, Page Not Found
|
Sorry, File Not Found
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import EULAView from "@/screens/Authentication/EULAView";
|
|
||||||
|
|
||||||
export default function EULA() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<EULAView />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
263
bun.lock
263
bun.lock
@@ -68,7 +68,6 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.25.2",
|
"@babel/core": "^7.25.2",
|
||||||
"@react-native-community/cli": "^20.0.2",
|
"@react-native-community/cli": "^20.0.2",
|
||||||
"@react-native/metro-config": "^0.83.1",
|
|
||||||
"@types/react": "~19.1.10",
|
"@types/react": "~19.1.10",
|
||||||
"eslint": "^9.25.0",
|
"eslint": "^9.25.0",
|
||||||
"eslint-config-expo": "~10.0.0",
|
"eslint-config-expo": "~10.0.0",
|
||||||
@@ -708,9 +707,9 @@
|
|||||||
|
|
||||||
"@react-native/assets-registry": ["@react-native/assets-registry@0.81.4", "", {}, "sha512-AMcDadefBIjD10BRqkWw+W/VdvXEomR6aEZ0fhQRAv7igrBzb4PTn4vHKYg+sUK0e3wa74kcMy2DLc/HtnGcMA=="],
|
"@react-native/assets-registry": ["@react-native/assets-registry@0.81.4", "", {}, "sha512-AMcDadefBIjD10BRqkWw+W/VdvXEomR6aEZ0fhQRAv7igrBzb4PTn4vHKYg+sUK0e3wa74kcMy2DLc/HtnGcMA=="],
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen": ["@react-native/babel-plugin-codegen@0.83.1", "", { "dependencies": { "@babel/traverse": "^7.25.3", "@react-native/codegen": "0.83.1" } }, "sha512-VPj8O3pG1ESjZho9WVKxqiuryrotAECPHGF5mx46zLUYNTWR5u9OMUXYk7LeLy+JLWdGEZ2Gn3KoXeFZbuqE+g=="],
|
"@react-native/babel-plugin-codegen": ["@react-native/babel-plugin-codegen@0.79.5", "", { "dependencies": { "@babel/traverse": "^7.25.3", "@react-native/codegen": "0.79.5" } }, "sha512-Rt/imdfqXihD/sn0xnV4flxxb1aLLjPtMF1QleQjEhJsTUPpH4TFlfOpoCvsrXoDl4OIcB1k4FVM24Ez92zf5w=="],
|
||||||
|
|
||||||
"@react-native/babel-preset": ["@react-native/babel-preset@0.83.1", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-proposal-export-default-from": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-default-from": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.24.7", "@babel/plugin-transform-async-generator-functions": "^7.25.4", "@babel/plugin-transform-async-to-generator": "^7.24.7", "@babel/plugin-transform-block-scoping": "^7.25.0", "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/plugin-transform-classes": "^7.25.4", "@babel/plugin-transform-computed-properties": "^7.24.7", "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-flow-strip-types": "^7.25.2", "@babel/plugin-transform-for-of": "^7.24.7", "@babel/plugin-transform-function-name": "^7.25.1", "@babel/plugin-transform-literals": "^7.25.2", "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", "@babel/plugin-transform-modules-commonjs": "^7.24.8", "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", "@babel/plugin-transform-numeric-separator": "^7.24.7", "@babel/plugin-transform-object-rest-spread": "^7.24.7", "@babel/plugin-transform-optional-catch-binding": "^7.24.7", "@babel/plugin-transform-optional-chaining": "^7.24.8", "@babel/plugin-transform-parameters": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/plugin-transform-private-property-in-object": "^7.24.7", "@babel/plugin-transform-react-display-name": "^7.24.7", "@babel/plugin-transform-react-jsx": "^7.25.2", "@babel/plugin-transform-react-jsx-self": "^7.24.7", "@babel/plugin-transform-react-jsx-source": "^7.24.7", "@babel/plugin-transform-regenerator": "^7.24.7", "@babel/plugin-transform-runtime": "^7.24.7", "@babel/plugin-transform-shorthand-properties": "^7.24.7", "@babel/plugin-transform-spread": "^7.24.7", "@babel/plugin-transform-sticky-regex": "^7.24.7", "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", "@react-native/babel-plugin-codegen": "0.83.1", "babel-plugin-syntax-hermes-parser": "0.32.0", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" } }, "sha512-xI+tbsD4fXcI6PVU4sauRCh0a5fuLQC849SINmU2J5wP8kzKu4Ye0YkGjUW3mfGrjaZcjkWmF6s33jpyd3gdTw=="],
|
"@react-native/babel-preset": ["@react-native/babel-preset@0.79.5", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-proposal-export-default-from": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-default-from": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.24.7", "@babel/plugin-transform-async-generator-functions": "^7.25.4", "@babel/plugin-transform-async-to-generator": "^7.24.7", "@babel/plugin-transform-block-scoping": "^7.25.0", "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/plugin-transform-classes": "^7.25.4", "@babel/plugin-transform-computed-properties": "^7.24.7", "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-flow-strip-types": "^7.25.2", "@babel/plugin-transform-for-of": "^7.24.7", "@babel/plugin-transform-function-name": "^7.25.1", "@babel/plugin-transform-literals": "^7.25.2", "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", "@babel/plugin-transform-modules-commonjs": "^7.24.8", "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", "@babel/plugin-transform-numeric-separator": "^7.24.7", "@babel/plugin-transform-object-rest-spread": "^7.24.7", "@babel/plugin-transform-optional-catch-binding": "^7.24.7", "@babel/plugin-transform-optional-chaining": "^7.24.8", "@babel/plugin-transform-parameters": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/plugin-transform-private-property-in-object": "^7.24.7", "@babel/plugin-transform-react-display-name": "^7.24.7", "@babel/plugin-transform-react-jsx": "^7.25.2", "@babel/plugin-transform-react-jsx-self": "^7.24.7", "@babel/plugin-transform-react-jsx-source": "^7.24.7", "@babel/plugin-transform-regenerator": "^7.24.7", "@babel/plugin-transform-runtime": "^7.24.7", "@babel/plugin-transform-shorthand-properties": "^7.24.7", "@babel/plugin-transform-spread": "^7.24.7", "@babel/plugin-transform-sticky-regex": "^7.24.7", "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", "@react-native/babel-plugin-codegen": "0.79.5", "babel-plugin-syntax-hermes-parser": "0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" } }, "sha512-GDUYIWslMLbdJHEgKNfrOzXk8EDKxKzbwmBXUugoiSlr6TyepVZsj3GZDLEFarOcTwH1EXXHJsixihk8DCRQDA=="],
|
||||||
|
|
||||||
"@react-native/codegen": ["@react-native/codegen@0.81.4", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/parser": "^7.25.3", "glob": "^7.1.1", "hermes-parser": "0.29.1", "invariant": "^2.2.4", "nullthrows": "^1.1.1", "yargs": "^17.6.2" } }, "sha512-LWTGUTzFu+qOQnvkzBP52B90Ym3stZT8IFCzzUrppz8Iwglg83FCtDZAR4yLHI29VY/x/+pkcWAMCl3739XHdw=="],
|
"@react-native/codegen": ["@react-native/codegen@0.81.4", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/parser": "^7.25.3", "glob": "^7.1.1", "hermes-parser": "0.29.1", "invariant": "^2.2.4", "nullthrows": "^1.1.1", "yargs": "^17.6.2" } }, "sha512-LWTGUTzFu+qOQnvkzBP52B90Ym3stZT8IFCzzUrppz8Iwglg83FCtDZAR4yLHI29VY/x/+pkcWAMCl3739XHdw=="],
|
||||||
|
|
||||||
@@ -722,11 +721,7 @@
|
|||||||
|
|
||||||
"@react-native/gradle-plugin": ["@react-native/gradle-plugin@0.81.4", "", {}, "sha512-T7fPcQvDDCSusZFVSg6H1oVDKb/NnVYLnsqkcHsAF2C2KGXyo3J7slH/tJAwNfj/7EOA2OgcWxfC1frgn9TQvw=="],
|
"@react-native/gradle-plugin": ["@react-native/gradle-plugin@0.81.4", "", {}, "sha512-T7fPcQvDDCSusZFVSg6H1oVDKb/NnVYLnsqkcHsAF2C2KGXyo3J7slH/tJAwNfj/7EOA2OgcWxfC1frgn9TQvw=="],
|
||||||
|
|
||||||
"@react-native/js-polyfills": ["@react-native/js-polyfills@0.83.1", "", {}, "sha512-qgPpdWn/c5laA+3WoJ6Fak8uOm7CG50nBsLlPsF8kbT7rUHIVB9WaP6+GPsoKV/H15koW7jKuLRoNVT7c3Ht3w=="],
|
"@react-native/js-polyfills": ["@react-native/js-polyfills@0.81.4", "", {}, "sha512-sr42FaypKXJHMVHhgSbu2f/ZJfrLzgaoQ+HdpRvKEiEh2mhFf6XzZwecyLBvWqf2pMPZa+CpPfNPiejXjKEy8w=="],
|
||||||
|
|
||||||
"@react-native/metro-babel-transformer": ["@react-native/metro-babel-transformer@0.83.1", "", { "dependencies": { "@babel/core": "^7.25.2", "@react-native/babel-preset": "0.83.1", "hermes-parser": "0.32.0", "nullthrows": "^1.1.1" } }, "sha512-fqt6DHWX1GBGDKa5WJOjDtPPy2M9lkYVLn59fBeFQ0GXhBRzNbUh8JzWWI/Q2CLDZ2tgKCcwaiXJ1OHWVd2BCQ=="],
|
|
||||||
|
|
||||||
"@react-native/metro-config": ["@react-native/metro-config@0.83.1", "", { "dependencies": { "@react-native/js-polyfills": "0.83.1", "@react-native/metro-babel-transformer": "0.83.1", "metro-config": "^0.83.3", "metro-runtime": "^0.83.3" } }, "sha512-1rjYZf62fCm6QAinHmRAKnJxIypX0VF/zBPd0qWvWABMZugrS0eACuIbk9Wk0StBod4yL8KnwEJyg77ak8xYzQ=="],
|
|
||||||
|
|
||||||
"@react-native/normalize-colors": ["@react-native/normalize-colors@0.81.4", "", {}, "sha512-9nRRHO1H+tcFqjb9gAM105Urtgcanbta2tuqCVY0NATHeFPDEAB7gPyiLxCHKMi1NbhP6TH0kxgSWXKZl1cyRg=="],
|
"@react-native/normalize-colors": ["@react-native/normalize-colors@0.81.4", "", {}, "sha512-9nRRHO1H+tcFqjb9gAM105Urtgcanbta2tuqCVY0NATHeFPDEAB7gPyiLxCHKMi1NbhP6TH0kxgSWXKZl1cyRg=="],
|
||||||
|
|
||||||
@@ -1590,9 +1585,9 @@
|
|||||||
|
|
||||||
"hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="],
|
"hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="],
|
||||||
|
|
||||||
"hermes-estree": ["hermes-estree@0.32.0", "", {}, "sha512-KWn3BqnlDOl97Xe1Yviur6NbgIZ+IP+UVSpshlZWkq+EtoHg6/cwiDj/osP9PCEgFE15KBm1O55JRwbMEm5ejQ=="],
|
"hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="],
|
||||||
|
|
||||||
"hermes-parser": ["hermes-parser@0.32.0", "", { "dependencies": { "hermes-estree": "0.32.0" } }, "sha512-g4nBOWFpuiTqjR3LZdRxKUkij9iyveWeuks7INEsMX741f3r9xxrOe8TeQfUxtda0eXmiIFiMQzoeSQEno33Hw=="],
|
"hermes-parser": ["hermes-parser@0.29.1", "", { "dependencies": { "hermes-estree": "0.29.1" } }, "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA=="],
|
||||||
|
|
||||||
"hey-listen": ["hey-listen@1.0.8", "", {}, "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q=="],
|
"hey-listen": ["hey-listen@1.0.8", "", {}, "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q=="],
|
||||||
|
|
||||||
@@ -1922,17 +1917,17 @@
|
|||||||
|
|
||||||
"merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],
|
"merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],
|
||||||
|
|
||||||
"metro": ["metro@0.83.3", "", { "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/core": "^7.25.2", "@babel/generator": "^7.25.0", "@babel/parser": "^7.25.3", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.3", "@babel/types": "^7.25.2", "accepts": "^1.3.7", "chalk": "^4.0.0", "ci-info": "^2.0.0", "connect": "^3.6.5", "debug": "^4.4.0", "error-stack-parser": "^2.0.6", "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", "hermes-parser": "0.32.0", "image-size": "^1.0.2", "invariant": "^2.2.4", "jest-worker": "^29.7.0", "jsc-safe-url": "^0.2.2", "lodash.throttle": "^4.1.1", "metro-babel-transformer": "0.83.3", "metro-cache": "0.83.3", "metro-cache-key": "0.83.3", "metro-config": "0.83.3", "metro-core": "0.83.3", "metro-file-map": "0.83.3", "metro-resolver": "0.83.3", "metro-runtime": "0.83.3", "metro-source-map": "0.83.3", "metro-symbolicate": "0.83.3", "metro-transform-plugins": "0.83.3", "metro-transform-worker": "0.83.3", "mime-types": "^2.1.27", "nullthrows": "^1.1.1", "serialize-error": "^2.1.0", "source-map": "^0.5.6", "throat": "^5.0.0", "ws": "^7.5.10", "yargs": "^17.6.2" }, "bin": { "metro": "src/cli.js" } }, "sha512-+rP+/GieOzkt97hSJ0MrPOuAH/jpaS21ZDvL9DJ35QYRDlQcwzcvUlGUf79AnQxq/2NPiS/AULhhM4TKutIt8Q=="],
|
"metro": ["metro@0.83.1", "", { "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/core": "^7.25.2", "@babel/generator": "^7.25.0", "@babel/parser": "^7.25.3", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.3", "@babel/types": "^7.25.2", "accepts": "^1.3.7", "chalk": "^4.0.0", "ci-info": "^2.0.0", "connect": "^3.6.5", "debug": "^4.4.0", "error-stack-parser": "^2.0.6", "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", "hermes-parser": "0.29.1", "image-size": "^1.0.2", "invariant": "^2.2.4", "jest-worker": "^29.7.0", "jsc-safe-url": "^0.2.2", "lodash.throttle": "^4.1.1", "metro-babel-transformer": "0.83.1", "metro-cache": "0.83.1", "metro-cache-key": "0.83.1", "metro-config": "0.83.1", "metro-core": "0.83.1", "metro-file-map": "0.83.1", "metro-resolver": "0.83.1", "metro-runtime": "0.83.1", "metro-source-map": "0.83.1", "metro-symbolicate": "0.83.1", "metro-transform-plugins": "0.83.1", "metro-transform-worker": "0.83.1", "mime-types": "^2.1.27", "nullthrows": "^1.1.1", "serialize-error": "^2.1.0", "source-map": "^0.5.6", "throat": "^5.0.0", "ws": "^7.5.10", "yargs": "^17.6.2" }, "bin": { "metro": "src/cli.js" } }, "sha512-UGKepmTxoGD4HkQV8YWvpvwef7fUujNtTgG4Ygf7m/M0qjvb9VuDmAsEU+UdriRX7F61pnVK/opz89hjKlYTXA=="],
|
||||||
|
|
||||||
"metro-babel-transformer": ["metro-babel-transformer@0.83.1", "", { "dependencies": { "@babel/core": "^7.25.2", "flow-enums-runtime": "^0.0.6", "hermes-parser": "0.29.1", "nullthrows": "^1.1.1" } }, "sha512-r3xAD3964E8dwDBaZNSO2aIIvWXjIK80uO2xo0/pi3WI8XWT9h5SCjtGWtMtE5PRWw+t20TN0q1WMRsjvhC1rQ=="],
|
"metro-babel-transformer": ["metro-babel-transformer@0.83.1", "", { "dependencies": { "@babel/core": "^7.25.2", "flow-enums-runtime": "^0.0.6", "hermes-parser": "0.29.1", "nullthrows": "^1.1.1" } }, "sha512-r3xAD3964E8dwDBaZNSO2aIIvWXjIK80uO2xo0/pi3WI8XWT9h5SCjtGWtMtE5PRWw+t20TN0q1WMRsjvhC1rQ=="],
|
||||||
|
|
||||||
"metro-cache": ["metro-cache@0.83.3", "", { "dependencies": { "exponential-backoff": "^3.1.1", "flow-enums-runtime": "^0.0.6", "https-proxy-agent": "^7.0.5", "metro-core": "0.83.3" } }, "sha512-3jo65X515mQJvKqK3vWRblxDEcgY55Sk3w4xa6LlfEXgQ9g1WgMh9m4qVZVwgcHoLy0a2HENTPCCX4Pk6s8c8Q=="],
|
"metro-cache": ["metro-cache@0.83.1", "", { "dependencies": { "exponential-backoff": "^3.1.1", "flow-enums-runtime": "^0.0.6", "https-proxy-agent": "^7.0.5", "metro-core": "0.83.1" } }, "sha512-7N/Ad1PHa1YMWDNiyynTPq34Op2qIE68NWryGEQ4TSE3Zy6a8GpsYnEEZE4Qi6aHgsE+yZHKkRczeBgxhnFIxQ=="],
|
||||||
|
|
||||||
"metro-cache-key": ["metro-cache-key@0.83.1", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-ZUs+GD5CNeDLxx5UUWmfg26IL+Dnbryd+TLqTlZnDEgehkIa11kUSvgF92OFfJhONeXzV4rZDRGNXoo6JT+8Gg=="],
|
"metro-cache-key": ["metro-cache-key@0.83.1", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-ZUs+GD5CNeDLxx5UUWmfg26IL+Dnbryd+TLqTlZnDEgehkIa11kUSvgF92OFfJhONeXzV4rZDRGNXoo6JT+8Gg=="],
|
||||||
|
|
||||||
"metro-config": ["metro-config@0.83.3", "", { "dependencies": { "connect": "^3.6.5", "flow-enums-runtime": "^0.0.6", "jest-validate": "^29.7.0", "metro": "0.83.3", "metro-cache": "0.83.3", "metro-core": "0.83.3", "metro-runtime": "0.83.3", "yaml": "^2.6.1" } }, "sha512-mTel7ipT0yNjKILIan04bkJkuCzUUkm2SeEaTads8VfEecCh+ltXchdq6DovXJqzQAXuR2P9cxZB47Lg4klriA=="],
|
"metro-config": ["metro-config@0.83.1", "", { "dependencies": { "connect": "^3.6.5", "cosmiconfig": "^5.0.5", "flow-enums-runtime": "^0.0.6", "jest-validate": "^29.7.0", "metro": "0.83.1", "metro-cache": "0.83.1", "metro-core": "0.83.1", "metro-runtime": "0.83.1" } }, "sha512-HJhpZx3wyOkux/jeF1o7akFJzZFdbn6Zf7UQqWrvp7gqFqNulQ8Mju09raBgPmmSxKDl4LbbNeigkX0/nKY1QA=="],
|
||||||
|
|
||||||
"metro-core": ["metro-core@0.83.3", "", { "dependencies": { "flow-enums-runtime": "^0.0.6", "lodash.throttle": "^4.1.1", "metro-resolver": "0.83.3" } }, "sha512-M+X59lm7oBmJZamc96usuF1kusd5YimqG/q97g4Ac7slnJ3YiGglW5CsOlicTR5EWf8MQFxxjDoB6ytTqRe8Hw=="],
|
"metro-core": ["metro-core@0.83.1", "", { "dependencies": { "flow-enums-runtime": "^0.0.6", "lodash.throttle": "^4.1.1", "metro-resolver": "0.83.1" } }, "sha512-uVL1eAJcMFd2o2Q7dsbpg8COaxjZBBGaXqO2OHnivpCdfanraVL8dPmY6It9ZeqWLOihUKZ2yHW4b6soVCzH/Q=="],
|
||||||
|
|
||||||
"metro-file-map": ["metro-file-map@0.83.1", "", { "dependencies": { "debug": "^4.4.0", "fb-watchman": "^2.0.0", "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", "invariant": "^2.2.4", "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "nullthrows": "^1.1.1", "walker": "^1.0.7" } }, "sha512-Yu429lnexKl44PttKw3nhqgmpBR+6UQ/tRaYcxPeEShtcza9DWakCn7cjqDTQZtWR2A8xSNv139izJMyQ4CG+w=="],
|
"metro-file-map": ["metro-file-map@0.83.1", "", { "dependencies": { "debug": "^4.4.0", "fb-watchman": "^2.0.0", "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", "invariant": "^2.2.4", "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "nullthrows": "^1.1.1", "walker": "^1.0.7" } }, "sha512-Yu429lnexKl44PttKw3nhqgmpBR+6UQ/tRaYcxPeEShtcza9DWakCn7cjqDTQZtWR2A8xSNv139izJMyQ4CG+w=="],
|
||||||
|
|
||||||
@@ -1940,7 +1935,7 @@
|
|||||||
|
|
||||||
"metro-resolver": ["metro-resolver@0.83.1", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-t8j46kiILAqqFS5RNa+xpQyVjULxRxlvMidqUswPEk5nQVNdlJslqizDm/Et3v/JKwOtQGkYAQCHxP1zGStR/g=="],
|
"metro-resolver": ["metro-resolver@0.83.1", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-t8j46kiILAqqFS5RNa+xpQyVjULxRxlvMidqUswPEk5nQVNdlJslqizDm/Et3v/JKwOtQGkYAQCHxP1zGStR/g=="],
|
||||||
|
|
||||||
"metro-runtime": ["metro-runtime@0.83.3", "", { "dependencies": { "@babel/runtime": "^7.25.0", "flow-enums-runtime": "^0.0.6" } }, "sha512-JHCJb9ebr9rfJ+LcssFYA2x1qPYuSD/bbePupIGhpMrsla7RCwC/VL3yJ9cSU+nUhU4c9Ixxy8tBta+JbDeZWw=="],
|
"metro-runtime": ["metro-runtime@0.83.1", "", { "dependencies": { "@babel/runtime": "^7.25.0", "flow-enums-runtime": "^0.0.6" } }, "sha512-3Ag8ZS4IwafL/JUKlaeM6/CbkooY+WcVeqdNlBG0m4S0Qz0om3rdFdy1y6fYBpl6AwXJwWeMuXrvZdMuByTcRA=="],
|
||||||
|
|
||||||
"metro-source-map": ["metro-source-map@0.83.1", "", { "dependencies": { "@babel/traverse": "^7.25.3", "@babel/traverse--for-generate-function-map": "npm:@babel/traverse@^7.25.3", "@babel/types": "^7.25.2", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "metro-symbolicate": "0.83.1", "nullthrows": "^1.1.1", "ob1": "0.83.1", "source-map": "^0.5.6", "vlq": "^1.0.0" } }, "sha512-De7Vbeo96fFZ2cqmI0fWwVJbtHIwPZv++LYlWSwzTiCzxBDJORncN0LcT48Vi2UlQLzXJg+/CuTAcy7NBVh69A=="],
|
"metro-source-map": ["metro-source-map@0.83.1", "", { "dependencies": { "@babel/traverse": "^7.25.3", "@babel/traverse--for-generate-function-map": "npm:@babel/traverse@^7.25.3", "@babel/types": "^7.25.2", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "metro-symbolicate": "0.83.1", "nullthrows": "^1.1.1", "ob1": "0.83.1", "source-map": "^0.5.6", "vlq": "^1.0.0" } }, "sha512-De7Vbeo96fFZ2cqmI0fWwVJbtHIwPZv++LYlWSwzTiCzxBDJORncN0LcT48Vi2UlQLzXJg+/CuTAcy7NBVh69A=="],
|
||||||
|
|
||||||
@@ -2722,22 +2717,10 @@
|
|||||||
|
|
||||||
"@expo/json-file/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="],
|
"@expo/json-file/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="],
|
||||||
|
|
||||||
"@expo/metro/metro": ["metro@0.83.1", "", { "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/core": "^7.25.2", "@babel/generator": "^7.25.0", "@babel/parser": "^7.25.3", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.3", "@babel/types": "^7.25.2", "accepts": "^1.3.7", "chalk": "^4.0.0", "ci-info": "^2.0.0", "connect": "^3.6.5", "debug": "^4.4.0", "error-stack-parser": "^2.0.6", "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", "hermes-parser": "0.29.1", "image-size": "^1.0.2", "invariant": "^2.2.4", "jest-worker": "^29.7.0", "jsc-safe-url": "^0.2.2", "lodash.throttle": "^4.1.1", "metro-babel-transformer": "0.83.1", "metro-cache": "0.83.1", "metro-cache-key": "0.83.1", "metro-config": "0.83.1", "metro-core": "0.83.1", "metro-file-map": "0.83.1", "metro-resolver": "0.83.1", "metro-runtime": "0.83.1", "metro-source-map": "0.83.1", "metro-symbolicate": "0.83.1", "metro-transform-plugins": "0.83.1", "metro-transform-worker": "0.83.1", "mime-types": "^2.1.27", "nullthrows": "^1.1.1", "serialize-error": "^2.1.0", "source-map": "^0.5.6", "throat": "^5.0.0", "ws": "^7.5.10", "yargs": "^17.6.2" }, "bin": { "metro": "src/cli.js" } }, "sha512-UGKepmTxoGD4HkQV8YWvpvwef7fUujNtTgG4Ygf7m/M0qjvb9VuDmAsEU+UdriRX7F61pnVK/opz89hjKlYTXA=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro-cache": ["metro-cache@0.83.1", "", { "dependencies": { "exponential-backoff": "^3.1.1", "flow-enums-runtime": "^0.0.6", "https-proxy-agent": "^7.0.5", "metro-core": "0.83.1" } }, "sha512-7N/Ad1PHa1YMWDNiyynTPq34Op2qIE68NWryGEQ4TSE3Zy6a8GpsYnEEZE4Qi6aHgsE+yZHKkRczeBgxhnFIxQ=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro-config": ["metro-config@0.83.1", "", { "dependencies": { "connect": "^3.6.5", "cosmiconfig": "^5.0.5", "flow-enums-runtime": "^0.0.6", "jest-validate": "^29.7.0", "metro": "0.83.1", "metro-cache": "0.83.1", "metro-core": "0.83.1", "metro-runtime": "0.83.1" } }, "sha512-HJhpZx3wyOkux/jeF1o7akFJzZFdbn6Zf7UQqWrvp7gqFqNulQ8Mju09raBgPmmSxKDl4LbbNeigkX0/nKY1QA=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro-core": ["metro-core@0.83.1", "", { "dependencies": { "flow-enums-runtime": "^0.0.6", "lodash.throttle": "^4.1.1", "metro-resolver": "0.83.1" } }, "sha512-uVL1eAJcMFd2o2Q7dsbpg8COaxjZBBGaXqO2OHnivpCdfanraVL8dPmY6It9ZeqWLOihUKZ2yHW4b6soVCzH/Q=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro-runtime": ["metro-runtime@0.83.1", "", { "dependencies": { "@babel/runtime": "^7.25.0", "flow-enums-runtime": "^0.0.6" } }, "sha512-3Ag8ZS4IwafL/JUKlaeM6/CbkooY+WcVeqdNlBG0m4S0Qz0om3rdFdy1y6fYBpl6AwXJwWeMuXrvZdMuByTcRA=="],
|
|
||||||
|
|
||||||
"@expo/metro-config/@babel/generator": ["@babel/generator@7.28.3", "", { "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw=="],
|
"@expo/metro-config/@babel/generator": ["@babel/generator@7.28.3", "", { "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw=="],
|
||||||
|
|
||||||
"@expo/metro-config/@expo/json-file": ["@expo/json-file@10.0.7", "", { "dependencies": { "@babel/code-frame": "~7.10.4", "json5": "^2.2.3" } }, "sha512-z2OTC0XNO6riZu98EjdNHC05l51ySeTto6GP7oSQrCvQgG9ARBwD1YvMQaVZ9wU7p/4LzSf1O7tckL3B45fPpw=="],
|
"@expo/metro-config/@expo/json-file": ["@expo/json-file@10.0.7", "", { "dependencies": { "@babel/code-frame": "~7.10.4", "json5": "^2.2.3" } }, "sha512-z2OTC0XNO6riZu98EjdNHC05l51ySeTto6GP7oSQrCvQgG9ARBwD1YvMQaVZ9wU7p/4LzSf1O7tckL3B45fPpw=="],
|
||||||
|
|
||||||
"@expo/metro-config/hermes-parser": ["hermes-parser@0.29.1", "", { "dependencies": { "hermes-estree": "0.29.1" } }, "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA=="],
|
|
||||||
|
|
||||||
"@expo/metro-config/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
"@expo/metro-config/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
||||||
|
|
||||||
"@expo/npm-proofread/semver": ["semver@5.7.2", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],
|
"@expo/npm-proofread/semver": ["semver@5.7.2", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],
|
||||||
@@ -2802,24 +2785,28 @@
|
|||||||
|
|
||||||
"@react-native-community/cli-tools/semver": ["semver@7.7.2", "", { "bin": "bin/semver.js" }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
"@react-native-community/cli-tools/semver": ["semver@7.7.2", "", { "bin": "bin/semver.js" }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@babel/traverse": ["@babel/traverse@7.28.3", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.3", "@babel/template": "^7.27.2", "@babel/types": "^7.28.2", "debug": "^4.3.1" } }, "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ=="],
|
"@react-native/babel-plugin-codegen/@react-native/codegen": ["@react-native/codegen@0.79.5", "", { "dependencies": { "glob": "^7.1.1", "hermes-parser": "0.25.1", "invariant": "^2.2.4", "nullthrows": "^1.1.1", "yargs": "^17.6.2" }, "peerDependencies": { "@babel/core": "*" } }, "sha512-FO5U1R525A1IFpJjy+KVznEinAgcs3u7IbnbRJUG9IH/MBXi2lEU2LtN+JarJ81MCfW4V2p0pg6t/3RGHFRrlQ=="],
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@react-native/codegen": ["@react-native/codegen@0.83.1", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/parser": "^7.25.3", "glob": "^7.1.1", "hermes-parser": "0.32.0", "invariant": "^2.2.4", "nullthrows": "^1.1.1", "yargs": "^17.6.2" } }, "sha512-FpRxenonwH+c2a5X5DZMKUD7sCudHxB3eSQPgV9R+uxd28QWslyAWrpnJM/Az96AEksHnymDzEmzq2HLX5nb+g=="],
|
"@react-native/babel-preset/@babel/plugin-transform-async-generator-functions": ["@babel/plugin-transform-async-generator-functions@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-remap-async-to-generator": "^7.27.1", "@babel/traverse": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-eST9RrwlpaoJBDHShc+DS2SG4ATTi2MYNb4OxYkf3n+7eb49LWpnS+HSpVfW4x927qQwgk8A2hGNVaajAEw0EA=="],
|
||||||
|
|
||||||
"@react-native/babel-preset/babel-plugin-syntax-hermes-parser": ["babel-plugin-syntax-hermes-parser@0.32.0", "", { "dependencies": { "hermes-parser": "0.32.0" } }, "sha512-m5HthL++AbyeEA2FcdwOLfVFvWYECOBObLHNqdR8ceY4TsEdn4LdX2oTvbB2QJSSElE2AWA/b2MXZ/PF/CqLZg=="],
|
"@react-native/babel-preset/@babel/plugin-transform-block-scoping": ["@babel/plugin-transform-block-scoping@7.27.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-JF6uE2s67f0y2RZcm2kpAUEbD50vH62TyWVebxwHAlbSdM49VqPz8t4a1uIjp4NIOIZ4xzLfjY5emt/RCyC7TQ=="],
|
||||||
|
|
||||||
|
"@react-native/babel-preset/@babel/plugin-transform-classes": ["@babel/plugin-transform-classes@7.27.1", "", { "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.1", "@babel/helper-compilation-targets": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", "@babel/traverse": "^7.27.1", "globals": "^11.1.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-7iLhfFAubmpeJe/Wo2TVuDrykh/zlWXLzPNdL0Jqn/Xu8R3QQ8h9ff8FQoISZOsw74/HFqFI7NX63HN7QFIHKA=="],
|
||||||
|
|
||||||
|
"@react-native/babel-preset/@babel/plugin-transform-destructuring": ["@babel/plugin-transform-destructuring@7.27.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-s4Jrok82JpiaIprtY2nHsYmrThKvvwgHwjgd7UMiYhZaN0asdXNLr0y+NjTfkA7SyQE5i2Fb7eawUOZmLvyqOA=="],
|
||||||
|
|
||||||
|
"@react-native/babel-preset/@babel/plugin-transform-object-rest-spread": ["@babel/plugin-transform-object-rest-spread@7.27.3", "", { "dependencies": { "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", "@babel/plugin-transform-destructuring": "^7.27.3", "@babel/plugin-transform-parameters": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-7ZZtznF9g4l2JCImCo5LNKFHB5eXnN39lLtLY5Tg+VkR0jwOt7TBciMckuiQIOIW7L5tkQOCh3bVGYeXgMx52Q=="],
|
||||||
|
|
||||||
|
"@react-native/babel-preset/@babel/plugin-transform-parameters": ["@babel/plugin-transform-parameters@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-018KRk76HWKeZ5l4oTj2zPpSh+NbGdt0st5S6x0pga6HgrjBOJb24mMDHorFopOOd6YHkLgOZ+zaCjZGPO4aKg=="],
|
||||||
|
|
||||||
|
"@react-native/babel-preset/@babel/plugin-transform-regenerator": ["@babel/plugin-transform-regenerator@7.27.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-uhB8yHerfe3MWnuLAhEbeQ4afVoqv8BQsPqrTv7e/jZ9y00kJL6l9a/f4OWaKxotmjzewfEyXE1vgDJenkQ2/Q=="],
|
||||||
|
|
||||||
|
"@react-native/babel-preset/babel-plugin-syntax-hermes-parser": ["babel-plugin-syntax-hermes-parser@0.25.1", "", { "dependencies": { "hermes-parser": "0.25.1" } }, "sha512-IVNpGzboFLfXZUAwkLFcI/bnqVbwky0jP3eBno4HKtqvQJAHBLdgxiG6lQ4to0+Q/YCN3PO0od5NZwIKyY4REQ=="],
|
||||||
|
|
||||||
"@react-native/codegen/@babel/parser": ["@babel/parser@7.28.3", "", { "dependencies": { "@babel/types": "^7.28.2" }, "bin": "./bin/babel-parser.js" }, "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA=="],
|
"@react-native/codegen/@babel/parser": ["@babel/parser@7.28.3", "", { "dependencies": { "@babel/types": "^7.28.2" }, "bin": "./bin/babel-parser.js" }, "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA=="],
|
||||||
|
|
||||||
"@react-native/codegen/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
"@react-native/codegen/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
||||||
|
|
||||||
"@react-native/codegen/hermes-parser": ["hermes-parser@0.29.1", "", { "dependencies": { "hermes-estree": "0.29.1" } }, "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro": ["metro@0.83.1", "", { "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/core": "^7.25.2", "@babel/generator": "^7.25.0", "@babel/parser": "^7.25.3", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.3", "@babel/types": "^7.25.2", "accepts": "^1.3.7", "chalk": "^4.0.0", "ci-info": "^2.0.0", "connect": "^3.6.5", "debug": "^4.4.0", "error-stack-parser": "^2.0.6", "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", "hermes-parser": "0.29.1", "image-size": "^1.0.2", "invariant": "^2.2.4", "jest-worker": "^29.7.0", "jsc-safe-url": "^0.2.2", "lodash.throttle": "^4.1.1", "metro-babel-transformer": "0.83.1", "metro-cache": "0.83.1", "metro-cache-key": "0.83.1", "metro-config": "0.83.1", "metro-core": "0.83.1", "metro-file-map": "0.83.1", "metro-resolver": "0.83.1", "metro-runtime": "0.83.1", "metro-source-map": "0.83.1", "metro-symbolicate": "0.83.1", "metro-transform-plugins": "0.83.1", "metro-transform-worker": "0.83.1", "mime-types": "^2.1.27", "nullthrows": "^1.1.1", "serialize-error": "^2.1.0", "source-map": "^0.5.6", "throat": "^5.0.0", "ws": "^7.5.10", "yargs": "^17.6.2" }, "bin": { "metro": "src/cli.js" } }, "sha512-UGKepmTxoGD4HkQV8YWvpvwef7fUujNtTgG4Ygf7m/M0qjvb9VuDmAsEU+UdriRX7F61pnVK/opz89hjKlYTXA=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-config": ["metro-config@0.83.1", "", { "dependencies": { "connect": "^3.6.5", "cosmiconfig": "^5.0.5", "flow-enums-runtime": "^0.0.6", "jest-validate": "^29.7.0", "metro": "0.83.1", "metro-cache": "0.83.1", "metro-core": "0.83.1", "metro-runtime": "0.83.1" } }, "sha512-HJhpZx3wyOkux/jeF1o7akFJzZFdbn6Zf7UQqWrvp7gqFqNulQ8Mju09raBgPmmSxKDl4LbbNeigkX0/nKY1QA=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-core": ["metro-core@0.83.1", "", { "dependencies": { "flow-enums-runtime": "^0.0.6", "lodash.throttle": "^4.1.1", "metro-resolver": "0.83.1" } }, "sha512-uVL1eAJcMFd2o2Q7dsbpg8COaxjZBBGaXqO2OHnivpCdfanraVL8dPmY6It9ZeqWLOihUKZ2yHW4b6soVCzH/Q=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/semver": ["semver@7.7.2", "", { "bin": "bin/semver.js" }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
"@react-native/community-cli-plugin/semver": ["semver@7.7.2", "", { "bin": "bin/semver.js" }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
||||||
|
|
||||||
"@react-native/dev-middleware/open": ["open@7.4.2", "", { "dependencies": { "is-docker": "^2.0.0", "is-wsl": "^2.1.1" } }, "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q=="],
|
"@react-native/dev-middleware/open": ["open@7.4.2", "", { "dependencies": { "is-docker": "^2.0.0", "is-wsl": "^2.1.1" } }, "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q=="],
|
||||||
@@ -2862,14 +2849,10 @@
|
|||||||
|
|
||||||
"babel-plugin-react-compiler/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
"babel-plugin-react-compiler/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
||||||
|
|
||||||
"babel-plugin-syntax-hermes-parser/hermes-parser": ["hermes-parser@0.29.1", "", { "dependencies": { "hermes-estree": "0.29.1" } }, "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@babel/plugin-transform-object-rest-spread": ["@babel/plugin-transform-object-rest-spread@7.27.3", "", { "dependencies": { "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", "@babel/plugin-transform-destructuring": "^7.27.3", "@babel/plugin-transform-parameters": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-7ZZtznF9g4l2JCImCo5LNKFHB5eXnN39lLtLY5Tg+VkR0jwOt7TBciMckuiQIOIW7L5tkQOCh3bVGYeXgMx52Q=="],
|
"babel-preset-expo/@babel/plugin-transform-object-rest-spread": ["@babel/plugin-transform-object-rest-spread@7.27.3", "", { "dependencies": { "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", "@babel/plugin-transform-destructuring": "^7.27.3", "@babel/plugin-transform-parameters": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-7ZZtznF9g4l2JCImCo5LNKFHB5eXnN39lLtLY5Tg+VkR0jwOt7TBciMckuiQIOIW7L5tkQOCh3bVGYeXgMx52Q=="],
|
||||||
|
|
||||||
"babel-preset-expo/@babel/plugin-transform-parameters": ["@babel/plugin-transform-parameters@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-018KRk76HWKeZ5l4oTj2zPpSh+NbGdt0st5S6x0pga6HgrjBOJb24mMDHorFopOOd6YHkLgOZ+zaCjZGPO4aKg=="],
|
"babel-preset-expo/@babel/plugin-transform-parameters": ["@babel/plugin-transform-parameters@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-018KRk76HWKeZ5l4oTj2zPpSh+NbGdt0st5S6x0pga6HgrjBOJb24mMDHorFopOOd6YHkLgOZ+zaCjZGPO4aKg=="],
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset": ["@react-native/babel-preset@0.79.5", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-proposal-export-default-from": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-default-from": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.24.7", "@babel/plugin-transform-async-generator-functions": "^7.25.4", "@babel/plugin-transform-async-to-generator": "^7.24.7", "@babel/plugin-transform-block-scoping": "^7.25.0", "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/plugin-transform-classes": "^7.25.4", "@babel/plugin-transform-computed-properties": "^7.24.7", "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-flow-strip-types": "^7.25.2", "@babel/plugin-transform-for-of": "^7.24.7", "@babel/plugin-transform-function-name": "^7.25.1", "@babel/plugin-transform-literals": "^7.25.2", "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", "@babel/plugin-transform-modules-commonjs": "^7.24.8", "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", "@babel/plugin-transform-numeric-separator": "^7.24.7", "@babel/plugin-transform-object-rest-spread": "^7.24.7", "@babel/plugin-transform-optional-catch-binding": "^7.24.7", "@babel/plugin-transform-optional-chaining": "^7.24.8", "@babel/plugin-transform-parameters": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/plugin-transform-private-property-in-object": "^7.24.7", "@babel/plugin-transform-react-display-name": "^7.24.7", "@babel/plugin-transform-react-jsx": "^7.25.2", "@babel/plugin-transform-react-jsx-self": "^7.24.7", "@babel/plugin-transform-react-jsx-source": "^7.24.7", "@babel/plugin-transform-regenerator": "^7.24.7", "@babel/plugin-transform-runtime": "^7.24.7", "@babel/plugin-transform-shorthand-properties": "^7.24.7", "@babel/plugin-transform-spread": "^7.24.7", "@babel/plugin-transform-sticky-regex": "^7.24.7", "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", "@react-native/babel-plugin-codegen": "0.79.5", "babel-plugin-syntax-hermes-parser": "0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" } }, "sha512-GDUYIWslMLbdJHEgKNfrOzXk8EDKxKzbwmBXUugoiSlr6TyepVZsj3GZDLEFarOcTwH1EXXHJsixihk8DCRQDA=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/babel-plugin-syntax-hermes-parser": ["babel-plugin-syntax-hermes-parser@0.25.1", "", { "dependencies": { "hermes-parser": "0.25.1" } }, "sha512-IVNpGzboFLfXZUAwkLFcI/bnqVbwky0jP3eBno4HKtqvQJAHBLdgxiG6lQ4to0+Q/YCN3PO0od5NZwIKyY4REQ=="],
|
"babel-preset-expo/babel-plugin-syntax-hermes-parser": ["babel-plugin-syntax-hermes-parser@0.25.1", "", { "dependencies": { "hermes-parser": "0.25.1" } }, "sha512-IVNpGzboFLfXZUAwkLFcI/bnqVbwky0jP3eBno4HKtqvQJAHBLdgxiG6lQ4to0+Q/YCN3PO0od5NZwIKyY4REQ=="],
|
||||||
|
|
||||||
"better-opn/open": ["open@8.4.2", "", { "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", "is-wsl": "^2.2.0" } }, "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ=="],
|
"better-opn/open": ["open@8.4.2", "", { "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", "is-wsl": "^2.2.0" } }, "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ=="],
|
||||||
@@ -3056,27 +3039,9 @@
|
|||||||
|
|
||||||
"metro/ci-info": ["ci-info@2.0.0", "", {}, "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="],
|
"metro/ci-info": ["ci-info@2.0.0", "", {}, "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="],
|
||||||
|
|
||||||
"metro/metro-babel-transformer": ["metro-babel-transformer@0.83.3", "", { "dependencies": { "@babel/core": "^7.25.2", "flow-enums-runtime": "^0.0.6", "hermes-parser": "0.32.0", "nullthrows": "^1.1.1" } }, "sha512-1vxlvj2yY24ES1O5RsSIvg4a4WeL7PFXgKOHvXTXiW0deLvQr28ExXj6LjwCCDZ4YZLhq6HddLpZnX4dEdSq5g=="],
|
|
||||||
|
|
||||||
"metro/metro-cache-key": ["metro-cache-key@0.83.3", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-59ZO049jKzSmvBmG/B5bZ6/dztP0ilp0o988nc6dpaDsU05Cl1c/lRf+yx8m9WW/JVgbmfO5MziBU559XjI5Zw=="],
|
|
||||||
|
|
||||||
"metro/metro-file-map": ["metro-file-map@0.83.3", "", { "dependencies": { "debug": "^4.4.0", "fb-watchman": "^2.0.0", "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", "invariant": "^2.2.4", "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "nullthrows": "^1.1.1", "walker": "^1.0.7" } }, "sha512-jg5AcyE0Q9Xbbu/4NAwwZkmQn7doJCKGW0SLeSJmzNB9Z24jBe0AL2PHNMy4eu0JiKtNWHz9IiONGZWq7hjVTA=="],
|
|
||||||
|
|
||||||
"metro/metro-resolver": ["metro-resolver@0.83.3", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-0js+zwI5flFxb1ktmR///bxHYg7OLpRpWZlBBruYG8OKYxeMP7SV0xQ/o/hUelrEMdK4LJzqVtHAhBm25LVfAQ=="],
|
|
||||||
|
|
||||||
"metro/metro-source-map": ["metro-source-map@0.83.3", "", { "dependencies": { "@babel/traverse": "^7.25.3", "@babel/traverse--for-generate-function-map": "npm:@babel/traverse@^7.25.3", "@babel/types": "^7.25.2", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "metro-symbolicate": "0.83.3", "nullthrows": "^1.1.1", "ob1": "0.83.3", "source-map": "^0.5.6", "vlq": "^1.0.0" } }, "sha512-xkC3qwUBh2psVZgVavo8+r2C9Igkk3DibiOXSAht1aYRRcztEZNFtAMtfSB7sdO2iFMx2Mlyu++cBxz/fhdzQg=="],
|
|
||||||
|
|
||||||
"metro/metro-symbolicate": ["metro-symbolicate@0.83.3", "", { "dependencies": { "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "metro-source-map": "0.83.3", "nullthrows": "^1.1.1", "source-map": "^0.5.6", "vlq": "^1.0.0" }, "bin": { "metro-symbolicate": "src/index.js" } }, "sha512-F/YChgKd6KbFK3eUR5HdUsfBqVsanf5lNTwFd4Ca7uuxnHgBC3kR/Hba/RGkenR3pZaGNp5Bu9ZqqP52Wyhomw=="],
|
|
||||||
|
|
||||||
"metro/metro-transform-plugins": ["metro-transform-plugins@0.83.3", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/generator": "^7.25.0", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.3", "flow-enums-runtime": "^0.0.6", "nullthrows": "^1.1.1" } }, "sha512-eRGoKJU6jmqOakBMH5kUB7VitEWiNrDzBHpYbkBXW7C5fUGeOd2CyqrosEzbMK5VMiZYyOcNFEphvxk3OXey2A=="],
|
|
||||||
|
|
||||||
"metro/metro-transform-worker": ["metro-transform-worker@0.83.3", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/generator": "^7.25.0", "@babel/parser": "^7.25.3", "@babel/types": "^7.25.2", "flow-enums-runtime": "^0.0.6", "metro": "0.83.3", "metro-babel-transformer": "0.83.3", "metro-cache": "0.83.3", "metro-cache-key": "0.83.3", "metro-minify-terser": "0.83.3", "metro-source-map": "0.83.3", "metro-transform-plugins": "0.83.3", "nullthrows": "^1.1.1" } }, "sha512-Ztekew9t/gOIMZX1tvJOgX7KlSLL5kWykl0Iwu2cL2vKMKVALRl1hysyhUw0vjpAvLFx+Kfq9VLjnHIkW32fPA=="],
|
|
||||||
|
|
||||||
"metro/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="],
|
"metro/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="],
|
||||||
|
|
||||||
"metro-babel-transformer/hermes-parser": ["hermes-parser@0.29.1", "", { "dependencies": { "hermes-estree": "0.29.1" } }, "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA=="],
|
"metro-config/cosmiconfig": ["cosmiconfig@5.2.1", "", { "dependencies": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", "js-yaml": "^3.13.1", "parse-json": "^4.0.0" } }, "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA=="],
|
||||||
|
|
||||||
"metro-core/metro-resolver": ["metro-resolver@0.83.3", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-0js+zwI5flFxb1ktmR///bxHYg7OLpRpWZlBBruYG8OKYxeMP7SV0xQ/o/hUelrEMdK4LJzqVtHAhBm25LVfAQ=="],
|
|
||||||
|
|
||||||
"metro-source-map/@babel/traverse": ["@babel/traverse@7.28.3", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.3", "@babel/template": "^7.27.2", "@babel/types": "^7.28.2", "debug": "^4.3.1" } }, "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ=="],
|
"metro-source-map/@babel/traverse": ["@babel/traverse@7.28.3", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.3", "@babel/template": "^7.27.2", "@babel/types": "^7.28.2", "debug": "^4.3.1" } }, "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ=="],
|
||||||
|
|
||||||
@@ -3092,10 +3057,6 @@
|
|||||||
|
|
||||||
"metro-transform-worker/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
"metro-transform-worker/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
||||||
|
|
||||||
"metro-transform-worker/metro": ["metro@0.83.1", "", { "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/core": "^7.25.2", "@babel/generator": "^7.25.0", "@babel/parser": "^7.25.3", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.3", "@babel/types": "^7.25.2", "accepts": "^1.3.7", "chalk": "^4.0.0", "ci-info": "^2.0.0", "connect": "^3.6.5", "debug": "^4.4.0", "error-stack-parser": "^2.0.6", "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", "hermes-parser": "0.29.1", "image-size": "^1.0.2", "invariant": "^2.2.4", "jest-worker": "^29.7.0", "jsc-safe-url": "^0.2.2", "lodash.throttle": "^4.1.1", "metro-babel-transformer": "0.83.1", "metro-cache": "0.83.1", "metro-cache-key": "0.83.1", "metro-config": "0.83.1", "metro-core": "0.83.1", "metro-file-map": "0.83.1", "metro-resolver": "0.83.1", "metro-runtime": "0.83.1", "metro-source-map": "0.83.1", "metro-symbolicate": "0.83.1", "metro-transform-plugins": "0.83.1", "metro-transform-worker": "0.83.1", "mime-types": "^2.1.27", "nullthrows": "^1.1.1", "serialize-error": "^2.1.0", "source-map": "^0.5.6", "throat": "^5.0.0", "ws": "^7.5.10", "yargs": "^17.6.2" }, "bin": { "metro": "src/cli.js" } }, "sha512-UGKepmTxoGD4HkQV8YWvpvwef7fUujNtTgG4Ygf7m/M0qjvb9VuDmAsEU+UdriRX7F61pnVK/opz89hjKlYTXA=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro-cache": ["metro-cache@0.83.1", "", { "dependencies": { "exponential-backoff": "^3.1.1", "flow-enums-runtime": "^0.0.6", "https-proxy-agent": "^7.0.5", "metro-core": "0.83.1" } }, "sha512-7N/Ad1PHa1YMWDNiyynTPq34Op2qIE68NWryGEQ4TSE3Zy6a8GpsYnEEZE4Qi6aHgsE+yZHKkRczeBgxhnFIxQ=="],
|
|
||||||
|
|
||||||
"micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
"micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
||||||
|
|
||||||
"node-fetch/whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
"node-fetch/whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||||
@@ -3124,14 +3085,10 @@
|
|||||||
|
|
||||||
"react-devtools-core/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="],
|
"react-devtools-core/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="],
|
||||||
|
|
||||||
"react-native/@react-native/js-polyfills": ["@react-native/js-polyfills@0.81.4", "", {}, "sha512-sr42FaypKXJHMVHhgSbu2f/ZJfrLzgaoQ+HdpRvKEiEh2mhFf6XzZwecyLBvWqf2pMPZa+CpPfNPiejXjKEy8w=="],
|
|
||||||
|
|
||||||
"react-native/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="],
|
"react-native/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="],
|
||||||
|
|
||||||
"react-native/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
"react-native/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
||||||
|
|
||||||
"react-native/metro-runtime": ["metro-runtime@0.83.1", "", { "dependencies": { "@babel/runtime": "^7.25.0", "flow-enums-runtime": "^0.0.6" } }, "sha512-3Ag8ZS4IwafL/JUKlaeM6/CbkooY+WcVeqdNlBG0m4S0Qz0om3rdFdy1y6fYBpl6AwXJwWeMuXrvZdMuByTcRA=="],
|
|
||||||
|
|
||||||
"react-native/semver": ["semver@7.7.2", "", { "bin": "bin/semver.js" }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
"react-native/semver": ["semver@7.7.2", "", { "bin": "bin/semver.js" }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
||||||
|
|
||||||
"react-native-paper/color": ["color@3.2.1", "", { "dependencies": { "color-convert": "^1.9.3", "color-string": "^1.6.0" } }, "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA=="],
|
"react-native-paper/color": ["color@3.2.1", "", { "dependencies": { "color-convert": "^1.9.3", "color-string": "^1.6.0" } }, "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA=="],
|
||||||
@@ -3308,26 +3265,8 @@
|
|||||||
|
|
||||||
"@expo/metro-config/@expo/json-file/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="],
|
"@expo/metro-config/@expo/json-file/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="],
|
||||||
|
|
||||||
"@expo/metro-config/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="],
|
|
||||||
|
|
||||||
"@expo/metro-config/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
|
"@expo/metro-config/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
|
||||||
|
|
||||||
"@expo/metro/metro/@babel/generator": ["@babel/generator@7.28.3", "", { "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro/@babel/parser": ["@babel/parser@7.28.3", "", { "dependencies": { "@babel/types": "^7.28.2" }, "bin": "./bin/babel-parser.js" }, "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro/@babel/traverse": ["@babel/traverse@7.28.3", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.3", "@babel/template": "^7.27.2", "@babel/types": "^7.28.2", "debug": "^4.3.1" } }, "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro/ci-info": ["ci-info@2.0.0", "", {}, "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro/hermes-parser": ["hermes-parser@0.29.1", "", { "dependencies": { "hermes-estree": "0.29.1" } }, "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro-config/cosmiconfig": ["cosmiconfig@5.2.1", "", { "dependencies": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", "js-yaml": "^3.13.1", "parse-json": "^4.0.0" } }, "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA=="],
|
|
||||||
|
|
||||||
"@expo/package-manager/@expo/json-file/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="],
|
"@expo/package-manager/@expo/json-file/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="],
|
||||||
|
|
||||||
"@expo/package-manager/ora/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="],
|
"@expo/package-manager/ora/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="],
|
||||||
@@ -3356,44 +3295,16 @@
|
|||||||
|
|
||||||
"@jest/reporters/string-length/char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="],
|
"@jest/reporters/string-length/char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="],
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@babel/traverse/@babel/generator": ["@babel/generator@7.28.3", "", { "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw=="],
|
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@babel/traverse/@babel/parser": ["@babel/parser@7.28.3", "", { "dependencies": { "@babel/types": "^7.28.2" }, "bin": "./bin/babel-parser.js" }, "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA=="],
|
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@babel/traverse/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@react-native/codegen/@babel/parser": ["@babel/parser@7.28.3", "", { "dependencies": { "@babel/types": "^7.28.2" }, "bin": "./bin/babel-parser.js" }, "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA=="],
|
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@react-native/codegen/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
"@react-native/babel-plugin-codegen/@react-native/codegen/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
||||||
|
|
||||||
|
"@react-native/babel-plugin-codegen/@react-native/codegen/hermes-parser": ["hermes-parser@0.25.1", "", { "dependencies": { "hermes-estree": "0.25.1" } }, "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA=="],
|
||||||
|
|
||||||
|
"@react-native/babel-preset/@babel/plugin-transform-classes/globals": ["globals@11.12.0", "", {}, "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="],
|
||||||
|
|
||||||
|
"@react-native/babel-preset/babel-plugin-syntax-hermes-parser/hermes-parser": ["hermes-parser@0.25.1", "", { "dependencies": { "hermes-estree": "0.25.1" } }, "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA=="],
|
||||||
|
|
||||||
"@react-native/codegen/@babel/parser/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
"@react-native/codegen/@babel/parser/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
||||||
|
|
||||||
"@react-native/codegen/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/@babel/generator": ["@babel/generator@7.28.3", "", { "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/@babel/parser": ["@babel/parser@7.28.3", "", { "dependencies": { "@babel/types": "^7.28.2" }, "bin": "./bin/babel-parser.js" }, "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/@babel/traverse": ["@babel/traverse@7.28.3", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.3", "@babel/template": "^7.27.2", "@babel/types": "^7.28.2", "debug": "^4.3.1" } }, "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/ci-info": ["ci-info@2.0.0", "", {}, "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/hermes-parser": ["hermes-parser@0.29.1", "", { "dependencies": { "hermes-estree": "0.29.1" } }, "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/metro-cache": ["metro-cache@0.83.1", "", { "dependencies": { "exponential-backoff": "^3.1.1", "flow-enums-runtime": "^0.0.6", "https-proxy-agent": "^7.0.5", "metro-core": "0.83.1" } }, "sha512-7N/Ad1PHa1YMWDNiyynTPq34Op2qIE68NWryGEQ4TSE3Zy6a8GpsYnEEZE4Qi6aHgsE+yZHKkRczeBgxhnFIxQ=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/metro-runtime": ["metro-runtime@0.83.1", "", { "dependencies": { "@babel/runtime": "^7.25.0", "flow-enums-runtime": "^0.0.6" } }, "sha512-3Ag8ZS4IwafL/JUKlaeM6/CbkooY+WcVeqdNlBG0m4S0Qz0om3rdFdy1y6fYBpl6AwXJwWeMuXrvZdMuByTcRA=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-config/cosmiconfig": ["cosmiconfig@5.2.1", "", { "dependencies": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", "js-yaml": "^3.13.1", "parse-json": "^4.0.0" } }, "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-config/metro-cache": ["metro-cache@0.83.1", "", { "dependencies": { "exponential-backoff": "^3.1.1", "flow-enums-runtime": "^0.0.6", "https-proxy-agent": "^7.0.5", "metro-core": "0.83.1" } }, "sha512-7N/Ad1PHa1YMWDNiyynTPq34Op2qIE68NWryGEQ4TSE3Zy6a8GpsYnEEZE4Qi6aHgsE+yZHKkRczeBgxhnFIxQ=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-config/metro-runtime": ["metro-runtime@0.83.1", "", { "dependencies": { "@babel/runtime": "^7.25.0", "flow-enums-runtime": "^0.0.6" } }, "sha512-3Ag8ZS4IwafL/JUKlaeM6/CbkooY+WcVeqdNlBG0m4S0Qz0om3rdFdy1y6fYBpl6AwXJwWeMuXrvZdMuByTcRA=="],
|
|
||||||
|
|
||||||
"@react-native/dev-middleware/open/is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="],
|
"@react-native/dev-middleware/open/is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="],
|
||||||
|
|
||||||
"@testing-library/react-native/pretty-format/@jest/schemas": ["@jest/schemas@30.0.5", "", { "dependencies": { "@sinclair/typebox": "^0.34.0" } }, "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA=="],
|
"@testing-library/react-native/pretty-format/@jest/schemas": ["@jest/schemas@30.0.5", "", { "dependencies": { "@sinclair/typebox": "^0.34.0" } }, "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA=="],
|
||||||
@@ -3410,22 +3321,8 @@
|
|||||||
|
|
||||||
"ansi-fragments/strip-ansi/ansi-regex": ["ansi-regex@4.1.1", "", {}, "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g=="],
|
"ansi-fragments/strip-ansi/ansi-regex": ["ansi-regex@4.1.1", "", {}, "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g=="],
|
||||||
|
|
||||||
"babel-plugin-syntax-hermes-parser/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@babel/plugin-transform-object-rest-spread/@babel/plugin-transform-destructuring": ["@babel/plugin-transform-destructuring@7.27.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-s4Jrok82JpiaIprtY2nHsYmrThKvvwgHwjgd7UMiYhZaN0asdXNLr0y+NjTfkA7SyQE5i2Fb7eawUOZmLvyqOA=="],
|
"babel-preset-expo/@babel/plugin-transform-object-rest-spread/@babel/plugin-transform-destructuring": ["@babel/plugin-transform-destructuring@7.27.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-s4Jrok82JpiaIprtY2nHsYmrThKvvwgHwjgd7UMiYhZaN0asdXNLr0y+NjTfkA7SyQE5i2Fb7eawUOZmLvyqOA=="],
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@babel/plugin-transform-async-generator-functions": ["@babel/plugin-transform-async-generator-functions@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-remap-async-to-generator": "^7.27.1", "@babel/traverse": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-eST9RrwlpaoJBDHShc+DS2SG4ATTi2MYNb4OxYkf3n+7eb49LWpnS+HSpVfW4x927qQwgk8A2hGNVaajAEw0EA=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@babel/plugin-transform-block-scoping": ["@babel/plugin-transform-block-scoping@7.27.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-JF6uE2s67f0y2RZcm2kpAUEbD50vH62TyWVebxwHAlbSdM49VqPz8t4a1uIjp4NIOIZ4xzLfjY5emt/RCyC7TQ=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@babel/plugin-transform-classes": ["@babel/plugin-transform-classes@7.27.1", "", { "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.1", "@babel/helper-compilation-targets": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", "@babel/traverse": "^7.27.1", "globals": "^11.1.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-7iLhfFAubmpeJe/Wo2TVuDrykh/zlWXLzPNdL0Jqn/Xu8R3QQ8h9ff8FQoISZOsw74/HFqFI7NX63HN7QFIHKA=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@babel/plugin-transform-destructuring": ["@babel/plugin-transform-destructuring@7.27.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-s4Jrok82JpiaIprtY2nHsYmrThKvvwgHwjgd7UMiYhZaN0asdXNLr0y+NjTfkA7SyQE5i2Fb7eawUOZmLvyqOA=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@babel/plugin-transform-regenerator": ["@babel/plugin-transform-regenerator@7.27.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-uhB8yHerfe3MWnuLAhEbeQ4afVoqv8BQsPqrTv7e/jZ9y00kJL6l9a/f4OWaKxotmjzewfEyXE1vgDJenkQ2/Q=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen": ["@react-native/babel-plugin-codegen@0.79.5", "", { "dependencies": { "@babel/traverse": "^7.25.3", "@react-native/codegen": "0.79.5" } }, "sha512-Rt/imdfqXihD/sn0xnV4flxxb1aLLjPtMF1QleQjEhJsTUPpH4TFlfOpoCvsrXoDl4OIcB1k4FVM24Ez92zf5w=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/babel-plugin-syntax-hermes-parser/hermes-parser": ["hermes-parser@0.25.1", "", { "dependencies": { "hermes-estree": "0.25.1" } }, "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA=="],
|
"babel-preset-expo/babel-plugin-syntax-hermes-parser/hermes-parser": ["hermes-parser@0.25.1", "", { "dependencies": { "hermes-estree": "0.25.1" } }, "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA=="],
|
||||||
|
|
||||||
"better-opn/open/is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="],
|
"better-opn/open/is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="],
|
||||||
@@ -3508,7 +3405,11 @@
|
|||||||
|
|
||||||
"logkitty/yargs/yargs-parser": ["yargs-parser@18.1.3", "", { "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ=="],
|
"logkitty/yargs/yargs-parser": ["yargs-parser@18.1.3", "", { "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ=="],
|
||||||
|
|
||||||
"metro-babel-transformer/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="],
|
"metro-config/cosmiconfig/import-fresh": ["import-fresh@2.0.0", "", { "dependencies": { "caller-path": "^2.0.0", "resolve-from": "^3.0.0" } }, "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg=="],
|
||||||
|
|
||||||
|
"metro-config/cosmiconfig/js-yaml": ["js-yaml@3.14.1", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": "bin/js-yaml.js" }, "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g=="],
|
||||||
|
|
||||||
|
"metro-config/cosmiconfig/parse-json": ["parse-json@4.0.0", "", { "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" } }, "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw=="],
|
||||||
|
|
||||||
"metro-source-map/@babel/traverse/@babel/generator": ["@babel/generator@7.28.3", "", { "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw=="],
|
"metro-source-map/@babel/traverse/@babel/generator": ["@babel/generator@7.28.3", "", { "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw=="],
|
||||||
|
|
||||||
@@ -3530,30 +3431,10 @@
|
|||||||
|
|
||||||
"metro-transform-worker/@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
|
"metro-transform-worker/@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
|
||||||
|
|
||||||
"metro-transform-worker/metro/@babel/traverse": ["@babel/traverse@7.28.3", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.3", "@babel/template": "^7.27.2", "@babel/types": "^7.28.2", "debug": "^4.3.1" } }, "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/ci-info": ["ci-info@2.0.0", "", {}, "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/hermes-parser": ["hermes-parser@0.29.1", "", { "dependencies": { "hermes-estree": "0.29.1" } }, "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/metro-config": ["metro-config@0.83.1", "", { "dependencies": { "connect": "^3.6.5", "cosmiconfig": "^5.0.5", "flow-enums-runtime": "^0.0.6", "jest-validate": "^29.7.0", "metro": "0.83.1", "metro-cache": "0.83.1", "metro-core": "0.83.1", "metro-runtime": "0.83.1" } }, "sha512-HJhpZx3wyOkux/jeF1o7akFJzZFdbn6Zf7UQqWrvp7gqFqNulQ8Mju09raBgPmmSxKDl4LbbNeigkX0/nKY1QA=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/metro-core": ["metro-core@0.83.1", "", { "dependencies": { "flow-enums-runtime": "^0.0.6", "lodash.throttle": "^4.1.1", "metro-resolver": "0.83.1" } }, "sha512-uVL1eAJcMFd2o2Q7dsbpg8COaxjZBBGaXqO2OHnivpCdfanraVL8dPmY6It9ZeqWLOihUKZ2yHW4b6soVCzH/Q=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/metro-runtime": ["metro-runtime@0.83.1", "", { "dependencies": { "@babel/runtime": "^7.25.0", "flow-enums-runtime": "^0.0.6" } }, "sha512-3Ag8ZS4IwafL/JUKlaeM6/CbkooY+WcVeqdNlBG0m4S0Qz0om3rdFdy1y6fYBpl6AwXJwWeMuXrvZdMuByTcRA=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro-cache/metro-core": ["metro-core@0.83.1", "", { "dependencies": { "flow-enums-runtime": "^0.0.6", "lodash.throttle": "^4.1.1", "metro-resolver": "0.83.1" } }, "sha512-uVL1eAJcMFd2o2Q7dsbpg8COaxjZBBGaXqO2OHnivpCdfanraVL8dPmY6It9ZeqWLOihUKZ2yHW4b6soVCzH/Q=="],
|
|
||||||
|
|
||||||
"metro/@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
"metro/@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
||||||
|
|
||||||
"metro/@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
|
"metro/@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
|
||||||
|
|
||||||
"metro/metro-source-map/ob1": ["ob1@0.83.3", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-egUxXCDwoWG06NGCS5s5AdcpnumHKJlfd3HH06P3m9TEMwwScfcY35wpQxbm9oHof+dM/lVH9Rfyu1elTVelSA=="],
|
|
||||||
|
|
||||||
"metro/metro-transform-worker/metro-minify-terser": ["metro-minify-terser@0.83.3", "", { "dependencies": { "flow-enums-runtime": "^0.0.6", "terser": "^5.15.0" } }, "sha512-O2BmfWj6FSfzBLrNCXt/rr2VYZdX5i6444QJU0fFoc7Ljg+Q+iqebwE3K0eTvkI6TRjELsXk1cjU+fXwAR4OjQ=="],
|
|
||||||
|
|
||||||
"node-fetch/whatwg-url/tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
"node-fetch/whatwg-url/tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
||||||
|
|
||||||
"node-fetch/whatwg-url/webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
"node-fetch/whatwg-url/webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
||||||
@@ -3648,18 +3529,6 @@
|
|||||||
|
|
||||||
"@expo/cli/ora/strip-ansi/ansi-regex": ["ansi-regex@4.1.1", "", {}, "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g=="],
|
"@expo/cli/ora/strip-ansi/ansi-regex": ["ansi-regex@4.1.1", "", {}, "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g=="],
|
||||||
|
|
||||||
"@expo/metro/metro-config/cosmiconfig/import-fresh": ["import-fresh@2.0.0", "", { "dependencies": { "caller-path": "^2.0.0", "resolve-from": "^3.0.0" } }, "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro-config/cosmiconfig/js-yaml": ["js-yaml@3.14.1", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": "bin/js-yaml.js" }, "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro-config/cosmiconfig/parse-json": ["parse-json@4.0.0", "", { "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" } }, "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro/@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro/@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="],
|
|
||||||
|
|
||||||
"@expo/package-manager/ora/chalk/ansi-styles": ["ansi-styles@3.2.1", "", { "dependencies": { "color-convert": "^1.9.0" } }, "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA=="],
|
"@expo/package-manager/ora/chalk/ansi-styles": ["ansi-styles@3.2.1", "", { "dependencies": { "color-convert": "^1.9.0" } }, "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA=="],
|
||||||
|
|
||||||
"@expo/package-manager/ora/chalk/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
|
"@expo/package-manager/ora/chalk/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
|
||||||
@@ -3674,30 +3543,12 @@
|
|||||||
|
|
||||||
"@jest/reporters/istanbul-lib-instrument/@babel/parser/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
"@jest/reporters/istanbul-lib-instrument/@babel/parser/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@babel/traverse/@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
"@react-native/babel-plugin-codegen/@react-native/codegen/hermes-parser/hermes-estree": ["hermes-estree@0.25.1", "", {}, "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw=="],
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@babel/traverse/@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
|
"@react-native/babel-preset/babel-plugin-syntax-hermes-parser/hermes-parser/hermes-estree": ["hermes-estree@0.25.1", "", {}, "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw=="],
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@react-native/codegen/@babel/parser/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-config/cosmiconfig/import-fresh": ["import-fresh@2.0.0", "", { "dependencies": { "caller-path": "^2.0.0", "resolve-from": "^3.0.0" } }, "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-config/cosmiconfig/js-yaml": ["js-yaml@3.14.1", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": "bin/js-yaml.js" }, "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-config/cosmiconfig/parse-json": ["parse-json@4.0.0", "", { "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" } }, "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="],
|
|
||||||
|
|
||||||
"@testing-library/react-native/pretty-format/@jest/schemas/@sinclair/typebox": ["@sinclair/typebox@0.34.40", "", {}, "sha512-gwBNIP8ZAYev/ORDWW0QvxdwPXwxBtLsdsJgSc7eDIRt8ubP+rxUBzPsrwnu16fgEF8Bx4lh/+mvQvJzcTM6Kw=="],
|
"@testing-library/react-native/pretty-format/@jest/schemas/@sinclair/typebox": ["@sinclair/typebox@0.34.40", "", {}, "sha512-gwBNIP8ZAYev/ORDWW0QvxdwPXwxBtLsdsJgSc7eDIRt8ubP+rxUBzPsrwnu16fgEF8Bx4lh/+mvQvJzcTM6Kw=="],
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@babel/plugin-transform-classes/globals": ["globals@11.12.0", "", {}, "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@react-native/codegen": ["@react-native/codegen@0.79.5", "", { "dependencies": { "glob": "^7.1.1", "hermes-parser": "0.25.1", "invariant": "^2.2.4", "nullthrows": "^1.1.1", "yargs": "^17.6.2" }, "peerDependencies": { "@babel/core": "*" } }, "sha512-FO5U1R525A1IFpJjy+KVznEinAgcs3u7IbnbRJUG9IH/MBXi2lEU2LtN+JarJ81MCfW4V2p0pg6t/3RGHFRrlQ=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/babel-plugin-syntax-hermes-parser/hermes-parser/hermes-estree": ["hermes-estree@0.25.1", "", {}, "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw=="],
|
"babel-preset-expo/babel-plugin-syntax-hermes-parser/hermes-parser/hermes-estree": ["hermes-estree@0.25.1", "", {}, "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw=="],
|
||||||
|
|
||||||
"expo-constants/@expo/config/@expo/config-plugins/slash": ["slash@3.0.0", "", {}, "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="],
|
"expo-constants/@expo/config/@expo/config-plugins/slash": ["slash@3.0.0", "", {}, "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="],
|
||||||
@@ -3724,14 +3575,14 @@
|
|||||||
|
|
||||||
"logkitty/yargs/yargs-parser/camelcase": ["camelcase@5.3.1", "", {}, "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="],
|
"logkitty/yargs/yargs-parser/camelcase": ["camelcase@5.3.1", "", {}, "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="],
|
||||||
|
|
||||||
|
"metro-config/cosmiconfig/import-fresh/resolve-from": ["resolve-from@3.0.0", "", {}, "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw=="],
|
||||||
|
|
||||||
|
"metro-config/cosmiconfig/js-yaml/argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="],
|
||||||
|
|
||||||
"metro-source-map/@babel/traverse/@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
"metro-source-map/@babel/traverse/@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
||||||
|
|
||||||
"metro-source-map/@babel/traverse/@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
|
"metro-source-map/@babel/traverse/@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
|
||||||
|
|
||||||
"metro-transform-worker/metro/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/metro-config/cosmiconfig": ["cosmiconfig@5.2.1", "", { "dependencies": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", "js-yaml": "^3.13.1", "parse-json": "^4.0.0" } }, "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA=="],
|
|
||||||
|
|
||||||
"pkg-dir/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
"pkg-dir/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
||||||
|
|
||||||
"qrcode/yargs/cliui/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
"qrcode/yargs/cliui/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||||
@@ -3762,10 +3613,6 @@
|
|||||||
|
|
||||||
"@expo/cli/ora/cli-cursor/restore-cursor/onetime": ["onetime@2.0.1", "", { "dependencies": { "mimic-fn": "^1.0.0" } }, "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ=="],
|
"@expo/cli/ora/cli-cursor/restore-cursor/onetime": ["onetime@2.0.1", "", { "dependencies": { "mimic-fn": "^1.0.0" } }, "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ=="],
|
||||||
|
|
||||||
"@expo/metro/metro-config/cosmiconfig/import-fresh/resolve-from": ["resolve-from@3.0.0", "", {}, "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw=="],
|
|
||||||
|
|
||||||
"@expo/metro/metro-config/cosmiconfig/js-yaml/argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="],
|
|
||||||
|
|
||||||
"@expo/package-manager/ora/chalk/ansi-styles/color-convert": ["color-convert@1.9.3", "", { "dependencies": { "color-name": "1.1.3" } }, "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="],
|
"@expo/package-manager/ora/chalk/ansi-styles/color-convert": ["color-convert@1.9.3", "", { "dependencies": { "color-name": "1.1.3" } }, "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="],
|
||||||
|
|
||||||
"@expo/package-manager/ora/chalk/supports-color/has-flag": ["has-flag@3.0.0", "", {}, "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="],
|
"@expo/package-manager/ora/chalk/supports-color/has-flag": ["has-flag@3.0.0", "", {}, "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="],
|
||||||
@@ -3774,28 +3621,12 @@
|
|||||||
|
|
||||||
"@istanbuljs/load-nyc-config/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
"@istanbuljs/load-nyc-config/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-config/cosmiconfig/import-fresh/resolve-from": ["resolve-from@3.0.0", "", {}, "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw=="],
|
|
||||||
|
|
||||||
"@react-native/community-cli-plugin/metro-config/cosmiconfig/js-yaml/argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@react-native/codegen/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@react-native/codegen/hermes-parser": ["hermes-parser@0.25.1", "", { "dependencies": { "hermes-estree": "0.25.1" } }, "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA=="],
|
|
||||||
|
|
||||||
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse": ["@babel/traverse@7.28.3", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.3", "@babel/template": "^7.27.2", "@babel/types": "^7.28.2", "debug": "^4.3.1" } }, "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ=="],
|
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse": ["@babel/traverse@7.28.3", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.3", "@babel/template": "^7.27.2", "@babel/types": "^7.28.2", "debug": "^4.3.1" } }, "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ=="],
|
||||||
|
|
||||||
"expo/babel-preset-expo/@react-native/babel-preset/babel-plugin-syntax-hermes-parser/hermes-parser": ["hermes-parser@0.29.1", "", { "dependencies": { "hermes-estree": "0.29.1" } }, "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA=="],
|
|
||||||
|
|
||||||
"expo/babel-preset-expo/babel-plugin-syntax-hermes-parser/hermes-parser/hermes-estree": ["hermes-estree@0.25.1", "", {}, "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw=="],
|
"expo/babel-preset-expo/babel-plugin-syntax-hermes-parser/hermes-parser/hermes-estree": ["hermes-estree@0.25.1", "", {}, "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw=="],
|
||||||
|
|
||||||
"logkitty/yargs/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
"logkitty/yargs/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
||||||
|
|
||||||
"metro-transform-worker/metro/metro-config/cosmiconfig/import-fresh": ["import-fresh@2.0.0", "", { "dependencies": { "caller-path": "^2.0.0", "resolve-from": "^3.0.0" } }, "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/metro-config/cosmiconfig/js-yaml": ["js-yaml@3.14.1", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": "bin/js-yaml.js" }, "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/metro-config/cosmiconfig/parse-json": ["parse-json@4.0.0", "", { "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" } }, "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw=="],
|
|
||||||
|
|
||||||
"pkg-dir/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
"pkg-dir/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
||||||
|
|
||||||
"qrcode/yargs/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
"qrcode/yargs/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
||||||
@@ -3808,22 +3639,14 @@
|
|||||||
|
|
||||||
"@expo/package-manager/ora/cli-cursor/restore-cursor/onetime/mimic-fn": ["mimic-fn@1.2.0", "", {}, "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="],
|
"@expo/package-manager/ora/cli-cursor/restore-cursor/onetime/mimic-fn": ["mimic-fn@1.2.0", "", {}, "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="],
|
||||||
|
|
||||||
"babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@react-native/codegen/hermes-parser/hermes-estree": ["hermes-estree@0.25.1", "", {}, "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw=="],
|
|
||||||
|
|
||||||
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse/@babel/generator": ["@babel/generator@7.28.3", "", { "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw=="],
|
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse/@babel/generator": ["@babel/generator@7.28.3", "", { "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw=="],
|
||||||
|
|
||||||
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse/@babel/parser": ["@babel/parser@7.28.3", "", { "dependencies": { "@babel/types": "^7.28.2" }, "bin": "./bin/babel-parser.js" }, "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA=="],
|
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse/@babel/parser": ["@babel/parser@7.28.3", "", { "dependencies": { "@babel/types": "^7.28.2" }, "bin": "./bin/babel-parser.js" }, "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA=="],
|
||||||
|
|
||||||
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse/@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="],
|
||||||
|
|
||||||
"expo/babel-preset-expo/@react-native/babel-preset/babel-plugin-syntax-hermes-parser/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="],
|
|
||||||
|
|
||||||
"logkitty/yargs/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
"logkitty/yargs/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
||||||
|
|
||||||
"metro-transform-worker/metro/metro-config/cosmiconfig/import-fresh/resolve-from": ["resolve-from@3.0.0", "", {}, "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw=="],
|
|
||||||
|
|
||||||
"metro-transform-worker/metro/metro-config/cosmiconfig/js-yaml/argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="],
|
|
||||||
|
|
||||||
"qrcode/yargs/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
"qrcode/yargs/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
||||||
|
|
||||||
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse/@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
"expo/babel-preset-expo/@react-native/babel-preset/@react-native/babel-plugin-codegen/@babel/traverse/@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
||||||
|
|||||||
@@ -12,12 +12,10 @@ const LeftButtonCustom = ({
|
|||||||
path,
|
path,
|
||||||
icon = "arrow-back",
|
icon = "arrow-back",
|
||||||
iconCustom,
|
iconCustom,
|
||||||
onPress,
|
|
||||||
}: {
|
}: {
|
||||||
path?: Href;
|
path?: Href;
|
||||||
icon?: React.ReactNode | any;
|
icon?: React.ReactNode | any;
|
||||||
iconCustom?: React.ReactNode;
|
iconCustom?: React.ReactNode;
|
||||||
onPress?: () => void;
|
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -28,7 +26,7 @@ const LeftButtonCustom = ({
|
|||||||
name={icon}
|
name={icon}
|
||||||
size={20}
|
size={20}
|
||||||
color={MainColor.yellow}
|
color={MainColor.yellow}
|
||||||
onPress={() => (onPress ? onPress() : path ? router.replace(path) : router.back())}
|
onPress={() => (path ? router.replace(path) : router.back())}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
import { useRouter } from "expo-router";
|
|
||||||
import { BackButton } from "..";
|
|
||||||
|
|
||||||
export default function BackButtonFromNotification({
|
|
||||||
from,
|
|
||||||
category,
|
|
||||||
}: {
|
|
||||||
from: string;
|
|
||||||
category?: string;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<BackButton
|
|
||||||
onPress={() => {
|
|
||||||
if (from === "notifications") {
|
|
||||||
router.replace(`/notifications?category=${category}`);
|
|
||||||
} else {
|
|
||||||
if (from) {
|
|
||||||
router.replace(`/${from}` as any);
|
|
||||||
} else {
|
|
||||||
router.navigate("/home");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -24,6 +24,8 @@ const DateTimePickerCustom: React.FC<Props> = ({
|
|||||||
disabled = false,
|
disabled = false,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
|
console.log("Date Android Comp", value)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{Platform.OS === "ios" ? (
|
{Platform.OS === "ios" ? (
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export default function AvatarComp({
|
|||||||
href = `/(application)/(image)/preview-image/${fileId}`,
|
href = `/(application)/(image)/preview-image/${fileId}`,
|
||||||
}: AvatarCompProps) {
|
}: AvatarCompProps) {
|
||||||
const dimension = sizeMap[size];
|
const dimension = sizeMap[size];
|
||||||
|
|
||||||
const avatarImage = () => {
|
const avatarImage = () => {
|
||||||
return (
|
return (
|
||||||
<Avatar.Image
|
<Avatar.Image
|
||||||
@@ -51,9 +52,8 @@ export default function AvatarComp({
|
|||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
activeOpacity={0.9}
|
activeOpacity={0.9}
|
||||||
onPress={
|
onPress={
|
||||||
href || fileId ? () => router.navigate(href as any) : onPress
|
href && fileId ? () => router.navigate(href as any) : onPress
|
||||||
}
|
}
|
||||||
disabled={!fileId}
|
|
||||||
>
|
>
|
||||||
{avatarImage()}
|
{avatarImage()}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
import { Modal, View } from "react-native";
|
|
||||||
|
|
||||||
export default function ModalReactNative({
|
|
||||||
children,
|
|
||||||
isVisible,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
isVisible: boolean;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<Modal
|
|
||||||
animationType="slide"
|
|
||||||
backdropColor={"rgba(0, 0, 0, 0.5)"}
|
|
||||||
visible={isVisible}
|
|
||||||
>
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
flex: 1,
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
||||||
// margin: 10,
|
|
||||||
marginBlock: 30,
|
|
||||||
padding: 10,
|
|
||||||
borderRadius: 10,
|
|
||||||
paddingTop: 30
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</View>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
// src/components/BackgroundNotificationHandler.tsx
|
|
||||||
import { useNotificationStore } from "@/hooks/use-notification-store";
|
|
||||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
||||||
import {
|
|
||||||
FirebaseMessagingTypes,
|
|
||||||
getInitialNotification,
|
|
||||||
getMessaging,
|
|
||||||
onNotificationOpenedApp,
|
|
||||||
} from "@react-native-firebase/messaging";
|
|
||||||
import { router } from "expo-router";
|
|
||||||
import { useEffect, useRef } from "react";
|
|
||||||
|
|
||||||
const HANDLED_NOTIFICATIONS_KEY = "handled_notifications";
|
|
||||||
|
|
||||||
export default function BackgroundNotificationHandler() {
|
|
||||||
const { addNotification, markAsRead } = useNotificationStore();
|
|
||||||
const messaging = getMessaging();
|
|
||||||
const unsubscribeRef = useRef<(() => void) | null>(null); // 🔑 cegah duplikasi
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const init = async () => {
|
|
||||||
// 1. Handle (cold start)
|
|
||||||
const initialNotification = await getInitialNotification(messaging);
|
|
||||||
if (initialNotification) {
|
|
||||||
handleNotification(initialNotification);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. Handle background
|
|
||||||
if (unsubscribeRef.current) {
|
|
||||||
unsubscribeRef.current();
|
|
||||||
}
|
|
||||||
|
|
||||||
const unsubscribe = onNotificationOpenedApp(
|
|
||||||
messaging,
|
|
||||||
(remoteMessage) => {
|
|
||||||
handleNotification(remoteMessage);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
unsubscribeRef.current = unsubscribe;
|
|
||||||
};
|
|
||||||
|
|
||||||
init();
|
|
||||||
|
|
||||||
// Cleanup saat komponen unmount
|
|
||||||
return () => {
|
|
||||||
if (unsubscribeRef.current) {
|
|
||||||
unsubscribeRef.current();
|
|
||||||
unsubscribeRef.current = null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}, [addNotification, messaging]);
|
|
||||||
|
|
||||||
const isNotificationHandled = async (
|
|
||||||
notificationId: string
|
|
||||||
): Promise<boolean> => {
|
|
||||||
const handled = await AsyncStorage.getItem(HANDLED_NOTIFICATIONS_KEY);
|
|
||||||
const ids = handled ? JSON.parse(handled) : [];
|
|
||||||
return ids.includes(notificationId);
|
|
||||||
};
|
|
||||||
|
|
||||||
const markNotificationAsHandled = async (notificationId: string) => {
|
|
||||||
const handled = await AsyncStorage.getItem(HANDLED_NOTIFICATIONS_KEY);
|
|
||||||
const ids = handled ? JSON.parse(handled) : [];
|
|
||||||
if (!ids.includes(notificationId)) {
|
|
||||||
ids.push(notificationId);
|
|
||||||
// Simpan maksimal 50 ID terakhir untuk hindari memori bocor
|
|
||||||
await AsyncStorage.setItem(
|
|
||||||
HANDLED_NOTIFICATIONS_KEY,
|
|
||||||
JSON.stringify(ids.slice(-50))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleNotification = async (
|
|
||||||
remoteMessage: FirebaseMessagingTypes.RemoteMessage
|
|
||||||
) => {
|
|
||||||
const { notification, data } = remoteMessage;
|
|
||||||
if (!notification?.title) return;
|
|
||||||
|
|
||||||
console.log(
|
|
||||||
"🚀 Notification received:",
|
|
||||||
JSON.stringify(remoteMessage, null, 2)
|
|
||||||
);
|
|
||||||
|
|
||||||
const notificationId = data?.id;
|
|
||||||
if (!notificationId || typeof notificationId !== "string") {
|
|
||||||
console.warn("Notification missing notificationId, skipping navigation");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ✅ Cek apakah sudah pernah ditangani
|
|
||||||
if (await isNotificationHandled(notificationId)) {
|
|
||||||
console.log("Notification already handled, skipping:", notificationId);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ✅ Tandai sebagai ditangani
|
|
||||||
await markNotificationAsHandled(notificationId);
|
|
||||||
|
|
||||||
// ✅ Normalisasi deepLink: pastikan string
|
|
||||||
let deepLink: string | undefined;
|
|
||||||
if (data?.deepLink) {
|
|
||||||
if (typeof data.deepLink === "string") {
|
|
||||||
deepLink = data.deepLink;
|
|
||||||
} else {
|
|
||||||
// Jika object (jarang), coba string-kan
|
|
||||||
deepLink = JSON.stringify(data.deepLink);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tambahkan ke UI state (agar muncul di daftar notifikasi & badge)
|
|
||||||
addNotification({
|
|
||||||
title: notification.title,
|
|
||||||
body: notification.body || "",
|
|
||||||
type: "announcement",
|
|
||||||
data: data as Record<string, string>, // aman karena di-normalisasi di useNotificationStore
|
|
||||||
});
|
|
||||||
|
|
||||||
markAsRead(data?.id as any);
|
|
||||||
|
|
||||||
// Navigasi
|
|
||||||
if (
|
|
||||||
data?.deepLink &&
|
|
||||||
typeof data.deepLink === "string" &&
|
|
||||||
data.deepLink.startsWith("/")
|
|
||||||
) {
|
|
||||||
setTimeout(() => {
|
|
||||||
try {
|
|
||||||
router.push(data.deepLink as any);
|
|
||||||
} catch (error) {
|
|
||||||
console.warn("Navigation failed:", error);
|
|
||||||
}
|
|
||||||
}, 100);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
// src/components/NotificationInitializer.tsx
|
|
||||||
import { useEffect } from "react";
|
|
||||||
import { useForegroundNotifications } from "@/hooks/use-foreground-notifications";
|
|
||||||
import { useNotificationStore } from "@/hooks/use-notification-store";
|
|
||||||
import type { FirebaseMessagingTypes } from "@react-native-firebase/messaging";
|
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
|
||||||
import { Platform } from "react-native";
|
|
||||||
import * as Device from "expo-device";
|
|
||||||
import * as Application from "expo-application";
|
|
||||||
import { apiDeviceRegisterToken } from "@/service/api-device-token";
|
|
||||||
import messaging, {
|
|
||||||
isSupported,
|
|
||||||
requestPermission,
|
|
||||||
getToken,
|
|
||||||
AuthorizationStatus,
|
|
||||||
} from "@react-native-firebase/messaging";
|
|
||||||
|
|
||||||
// ✅ Modular imports (sesuai v22+)
|
|
||||||
|
|
||||||
export default function NotificationInitializer() {
|
|
||||||
// Setup handler notifikasi
|
|
||||||
const { user, logout } = useAuth(); // dari AuthContext
|
|
||||||
const { addNotification } = useNotificationStore();
|
|
||||||
|
|
||||||
// Ambil token FCM (opsional, hanya untuk log)
|
|
||||||
useEffect(() => {
|
|
||||||
if (!user) {
|
|
||||||
console.log("User not available, skipping token sync");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const registerDeviceToken = async () => {
|
|
||||||
try {
|
|
||||||
// ✅ Dapatkan instance messaging
|
|
||||||
const messagingInstance = messaging();
|
|
||||||
|
|
||||||
// ✅ Gunakan instance sebagai argumen
|
|
||||||
const supported = await isSupported(messagingInstance);
|
|
||||||
if (!supported) {
|
|
||||||
console.log("‼️ FCM tidak didukung");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const authStatus = await requestPermission(messagingInstance);
|
|
||||||
if (authStatus !== AuthorizationStatus.AUTHORIZED) {
|
|
||||||
console.warn("Izin telah ditolak");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fcmToken = await getToken(messagingInstance);
|
|
||||||
if (!fcmToken) {
|
|
||||||
console.warn("Tidak bisa mendapatkan FCM token");
|
|
||||||
// logout();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("✅ FCM Token:", fcmToken);
|
|
||||||
|
|
||||||
const platform = Platform.OS; // "ios" | "android"
|
|
||||||
const model = Device.modelName || "unknown";
|
|
||||||
const appVersion =
|
|
||||||
(Application.nativeApplicationVersion || "unknown") +
|
|
||||||
"-" +
|
|
||||||
(Application.nativeBuildVersion || "unknown");
|
|
||||||
const deviceId =
|
|
||||||
Device.osInternalBuildId || Device.modelName || "unknown";
|
|
||||||
|
|
||||||
// Kirim ke backend
|
|
||||||
await apiDeviceRegisterToken({
|
|
||||||
data: {
|
|
||||||
fcmToken,
|
|
||||||
platform,
|
|
||||||
deviceId,
|
|
||||||
model,
|
|
||||||
appVersion,
|
|
||||||
userId: user?.id || "",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("✅ Device token berhasil didaftarkan ke backend");
|
|
||||||
} catch (error) {
|
|
||||||
console.error("❌ Gagal mendaftarkan device token:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
registerDeviceToken();
|
|
||||||
}, [user?.id]);
|
|
||||||
|
|
||||||
const handleForegroundNotification = (
|
|
||||||
message: FirebaseMessagingTypes.RemoteMessage
|
|
||||||
) => {
|
|
||||||
const title = message.notification?.title || "Notifikasi";
|
|
||||||
const body = message.notification?.body || "";
|
|
||||||
const rawData = message.data || {};
|
|
||||||
|
|
||||||
const safeData: Record<string, string> = {};
|
|
||||||
for (const key in rawData) {
|
|
||||||
safeData[key] =
|
|
||||||
typeof rawData[key] === "string"
|
|
||||||
? rawData[key]
|
|
||||||
: JSON.stringify(rawData[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("📥 Menambahkan ke store:", { title, body, safeData });
|
|
||||||
addNotification({ title, body, data: safeData, type: "announcement" });
|
|
||||||
console.log("✅ Notifikasi ditambahkan ke state");
|
|
||||||
};
|
|
||||||
|
|
||||||
useForegroundNotifications(handleForegroundNotification);
|
|
||||||
|
|
||||||
return null; // komponen ini tidak merender apa-apa
|
|
||||||
}
|
|
||||||
@@ -98,14 +98,13 @@ export const IconView = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IconDot = ({ size, color, onPress }: { size?: number; color?: string , onPress?: () => void}) => {
|
export const IconDot = ({ size, color }: { size?: number; color?: string }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Ionicons
|
<Ionicons
|
||||||
name="ellipsis-vertical"
|
name="ellipsis-vertical"
|
||||||
size={size || ICON_SIZE_MEDIUM}
|
size={size || ICON_SIZE_MEDIUM}
|
||||||
color={color || MainColor.darkblue}
|
color={color || MainColor.darkblue}
|
||||||
onPress={onPress}
|
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,21 +4,12 @@ import { Octicons } from "@expo/vector-icons";
|
|||||||
|
|
||||||
export { IconPlus };
|
export { IconPlus };
|
||||||
|
|
||||||
function IconPlus({
|
function IconPlus({ color, size }: { color?: string; size?: number }) {
|
||||||
color,
|
|
||||||
size,
|
|
||||||
onPress,
|
|
||||||
}: {
|
|
||||||
color?: string;
|
|
||||||
size?: number;
|
|
||||||
onPress?: () => void;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<Octicons
|
<Octicons
|
||||||
name="plus-circle"
|
name="plus-circle"
|
||||||
size={size || ICON_SIZE_MEDIUM}
|
size={size || ICON_SIZE_MEDIUM}
|
||||||
color={color || MainColor.white}
|
color={color || MainColor.white}
|
||||||
onPress={onPress}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,12 +19,11 @@ export {
|
|||||||
PADDING_SMALL,
|
PADDING_SMALL,
|
||||||
PADDING_MEDIUM,
|
PADDING_MEDIUM,
|
||||||
PADDING_LARGE,
|
PADDING_LARGE,
|
||||||
PAGINATION_DEFAULT_TAKE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// OS Height
|
// OS Height
|
||||||
const OS_ANDROID_HEIGHT = 115
|
const OS_ANDROID_HEIGHT = 115
|
||||||
const OS_IOS_HEIGHT = 90
|
const OS_IOS_HEIGHT = 70
|
||||||
const OS_HEIGHT = Platform.OS === "ios" ? OS_IOS_HEIGHT : OS_ANDROID_HEIGHT
|
const OS_HEIGHT = Platform.OS === "ios" ? OS_IOS_HEIGHT : OS_ANDROID_HEIGHT
|
||||||
|
|
||||||
// Text Size
|
// Text Size
|
||||||
@@ -52,5 +51,3 @@ const PADDING_SMALL = 12
|
|||||||
const PADDING_MEDIUM = 16
|
const PADDING_MEDIUM = 16
|
||||||
const PADDING_LARGE = 20
|
const PADDING_LARGE = 20
|
||||||
|
|
||||||
// Pagination
|
|
||||||
const PAGINATION_DEFAULT_TAKE = 10;
|
|
||||||
|
|||||||
@@ -2,13 +2,10 @@ import {
|
|||||||
apiConfig,
|
apiConfig,
|
||||||
apiLogin,
|
apiLogin,
|
||||||
apiRegister,
|
apiRegister,
|
||||||
apiUpdatedTermCondition,
|
|
||||||
apiValidationCode,
|
apiValidationCode,
|
||||||
} from "@/service/api-config";
|
} from "@/service/api-config";
|
||||||
import { apiDeviceTokenDeleted } from "@/service/api-device-token";
|
|
||||||
import { IUser } from "@/types/User";
|
import { IUser } from "@/types/User";
|
||||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||||
import * as Device from "expo-device";
|
|
||||||
import { router } from "expo-router";
|
import { router } from "expo-router";
|
||||||
import { createContext, useEffect, useState } from "react";
|
import { createContext, useEffect, useState } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
@@ -21,7 +18,7 @@ type AuthContextType = {
|
|||||||
isAuthenticated: boolean;
|
isAuthenticated: boolean;
|
||||||
isAdmin: boolean;
|
isAdmin: boolean;
|
||||||
isUserActive: boolean;
|
isUserActive: boolean;
|
||||||
loginWithNomor: (nomor: string) => Promise<boolean>;
|
loginWithNomor: (nomor: string) => Promise<void>;
|
||||||
validateOtp: (nomor: string) => Promise<any>;
|
validateOtp: (nomor: string) => Promise<any>;
|
||||||
logout: () => Promise<void>;
|
logout: () => Promise<void>;
|
||||||
registerUser: (userData: {
|
registerUser: (userData: {
|
||||||
@@ -30,15 +27,11 @@ type AuthContextType = {
|
|||||||
termsOfServiceAccepted: boolean;
|
termsOfServiceAccepted: boolean;
|
||||||
}) => Promise<void>;
|
}) => Promise<void>;
|
||||||
userData: (token: string) => Promise<any>;
|
userData: (token: string) => Promise<any>;
|
||||||
acceptedTerms: (
|
|
||||||
nomor: string,
|
|
||||||
onSetModalVisible: (visible: boolean) => void,
|
|
||||||
) => Promise<any>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// --- Create Context ---
|
// --- Create Context ---
|
||||||
export const AuthContext = createContext<AuthContextType | undefined>(
|
export const AuthContext = createContext<AuthContextType | undefined>(
|
||||||
undefined,
|
undefined
|
||||||
);
|
);
|
||||||
|
|
||||||
export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
||||||
@@ -79,15 +72,30 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
const loginWithNomor = async (nomor: string) => {
|
const loginWithNomor = async (nomor: string) => {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
try {
|
try {
|
||||||
|
console.log("[Masuk provider]", nomor);
|
||||||
const response = await apiLogin({ nomor: nomor });
|
const response = await apiLogin({ nomor: nomor });
|
||||||
console.log("[RESPONSE AUTH]", JSON.stringify(response, null, 2));
|
console.log("[RESPONSE AUTH]", JSON.stringify(response));
|
||||||
|
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
console.log("[Keluar provider]", nomor);
|
||||||
|
Toast.show({
|
||||||
|
type: "success",
|
||||||
|
text1: "Sukses",
|
||||||
|
text2: "Kode OTP berhasil dikirim",
|
||||||
|
});
|
||||||
|
|
||||||
if (response.success && response.isAcceptTerms) {
|
|
||||||
await AsyncStorage.setItem("kode_otp", response.kodeId);
|
await AsyncStorage.setItem("kode_otp", response.kodeId);
|
||||||
router.push(`/verification?nomor=${nomor}`);
|
router.push(`/verification?nomor=${nomor}`);
|
||||||
return true;
|
return;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
router.push(`/register?nomor=${nomor}`);
|
||||||
|
Toast.show({
|
||||||
|
type: "info",
|
||||||
|
text1: "Info",
|
||||||
|
text2: "Silahkan mendaftar",
|
||||||
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
throw new Error(error.response?.data?.message || "Gagal kirim OTP");
|
throw new Error(error.response?.data?.message || "Gagal kirim OTP");
|
||||||
@@ -96,6 +104,18 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// const loginWithNomor = async (nomor: string) => {
|
||||||
|
// setIsLoading(true);
|
||||||
|
// try {
|
||||||
|
// const response = await apiLogin({ nomor: nomor });
|
||||||
|
// await AsyncStorage.setItem("kode_otp", response.kodeId);
|
||||||
|
// } catch (error: any) {
|
||||||
|
// throw new Error(error.response?.data?.message || "Gagal kirim OTP");
|
||||||
|
// } finally {
|
||||||
|
// setIsLoading(false);
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
// --- 2. Validasi OTP & cek user ---
|
// --- 2. Validasi OTP & cek user ---
|
||||||
const validateOtp = async (nomor: string) => {
|
const validateOtp = async (nomor: string) => {
|
||||||
try {
|
try {
|
||||||
@@ -119,15 +139,13 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
await AsyncStorage.setItem("userData", JSON.stringify(dataUser));
|
await AsyncStorage.setItem("userData", JSON.stringify(dataUser));
|
||||||
|
|
||||||
if (response.active) {
|
if (response.active) {
|
||||||
// if (response.roleId === "1") {
|
if (response.roleId === "1") {
|
||||||
// router.replace("/(application)/(user)/home");
|
|
||||||
// return;
|
|
||||||
// } else {
|
|
||||||
// router.replace("/(application)/admin/dashboard");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
router.replace("/(application)/(user)/home");
|
router.replace("/(application)/(user)/home");
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
router.replace("/(application)/admin/dashboard");
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
router.replace("/(application)/(user)/waiting-room");
|
router.replace("/(application)/(user)/waiting-room");
|
||||||
return;
|
return;
|
||||||
@@ -143,7 +161,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.log("Error validasi otp >>", (error as Error).message || error);
|
console.log("Error validasi otp >>", (error as Error).message || error);
|
||||||
throw new Error(
|
throw new Error(
|
||||||
error.response?.data?.message || "OTP salah atau user tidak ditemukan",
|
error.response?.data?.message || "OTP salah atau user tidak ditemukan"
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
@@ -172,7 +190,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.log(
|
console.log(
|
||||||
"[LOAD USER DATA]",
|
"[LOAD USER DATA]",
|
||||||
error.response?.data?.message + "user" || "Gagal mengambil data user",
|
error.response?.data?.message + "user" || "Gagal mengambil data user"
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
@@ -188,6 +206,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
try {
|
try {
|
||||||
const response = await apiRegister({ data: userData });
|
const response = await apiRegister({ data: userData });
|
||||||
|
console.log("[REGISTER FETCH]", JSON.stringify(response, null, 2));
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
@@ -217,6 +236,42 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// const registerUser = async (userData: {
|
||||||
|
// username: string;
|
||||||
|
// nomor: string;
|
||||||
|
// termsOfServiceAccepted: boolean;
|
||||||
|
// }) => {
|
||||||
|
// setIsLoading(true);
|
||||||
|
// try {
|
||||||
|
// const response = await apiRegister({ data: userData });
|
||||||
|
// console.log("response", response);
|
||||||
|
|
||||||
|
// const { token } = response;
|
||||||
|
// if (!response.success) {
|
||||||
|
// Toast.show({
|
||||||
|
// type: "info",
|
||||||
|
// text1: "Info",
|
||||||
|
// text2: response.message,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// setToken(token);
|
||||||
|
// await AsyncStorage.setItem("authToken", token);
|
||||||
|
// Toast.show({
|
||||||
|
// type: "success",
|
||||||
|
// text1: "Sukses",
|
||||||
|
// text2: "Anda berhasil terdaftar",
|
||||||
|
// });
|
||||||
|
// router.replace("/(application)/(user)/waiting-room");
|
||||||
|
// return;
|
||||||
|
// } catch (error: any) {
|
||||||
|
// console.log("Error register", error);
|
||||||
|
// } finally {
|
||||||
|
// setIsLoading(false);
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
// --- 5. Logout ---
|
// --- 5. Logout ---
|
||||||
|
|
||||||
@@ -225,13 +280,9 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
setToken(null);
|
setToken(null);
|
||||||
setUser(null);
|
setUser(null);
|
||||||
|
|
||||||
const deviceId =
|
|
||||||
Device.osInternalBuildId || Device.modelName || "unknown";
|
|
||||||
|
|
||||||
await AsyncStorage.removeItem("authToken");
|
await AsyncStorage.removeItem("authToken");
|
||||||
await AsyncStorage.removeItem("userData");
|
await AsyncStorage.removeItem("userData");
|
||||||
await apiDeviceTokenDeleted({ userId: user?.id as any, deviceId });
|
setIsLoading(false);
|
||||||
|
|
||||||
Toast.show({
|
Toast.show({
|
||||||
type: "success",
|
type: "success",
|
||||||
@@ -246,28 +297,6 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// --- 6. Accept Terms ---
|
|
||||||
const acceptedTerms = async (
|
|
||||||
nomor: string,
|
|
||||||
onSetModalVisible: (visible: boolean) => void,
|
|
||||||
) => {
|
|
||||||
try {
|
|
||||||
setIsLoading(true);
|
|
||||||
const response = await apiUpdatedTermCondition({ nomor: nomor });
|
|
||||||
|
|
||||||
if (response.success) {
|
|
||||||
return `/verification?nomor=${nomor}`;
|
|
||||||
} else {
|
|
||||||
return `/register?nomor=${nomor}`;
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log("Error accept terms", error);
|
|
||||||
} finally {
|
|
||||||
setIsLoading(false);
|
|
||||||
onSetModalVisible(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AuthContext.Provider
|
<AuthContext.Provider
|
||||||
@@ -283,7 +312,6 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
|||||||
logout,
|
logout,
|
||||||
registerUser,
|
registerUser,
|
||||||
userData,
|
userData,
|
||||||
acceptedTerms,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<!-- Start Penerapan Pagination -->
|
|
||||||
|
|
||||||
File utama: screens/Notification/ScreenNotification.tsx
|
|
||||||
Fun fecth: apiGetNotificationsById
|
|
||||||
File fetch: service/api-notifications.ts
|
|
||||||
File komponen wrapper: components/_ShareComponent/NewWrapper.tsx
|
|
||||||
|
|
||||||
Terapkan pagination pada file "File utama"
|
|
||||||
Analisa juga file "File utama" , jika belum menggunakan NewWrapper pada file "File komponen wrapper" , maka terapkan juga dan ganti wrapper lama yaitu komponen ViewWrapper
|
|
||||||
|
|
||||||
Komponen pagination yang digunaka berada pada file hooks/use-pagination.tsx dan helpers/paginationHelpers.tsx
|
|
||||||
|
|
||||||
Perbaiki fetch "Fun fecth" , pada file "File fetch"
|
|
||||||
Jika tidak ada props page maka tambahkan props page dan default page: "1"
|
|
||||||
|
|
||||||
Gunakan bahasa indonesia pada cli agar saya mudah membacanya.
|
|
||||||
|
|
||||||
<!-- End Penerapan Pagination -->
|
|
||||||
|
|
||||||
<!-- Start Penerapan NewWrapper -->
|
|
||||||
Terapkan NewWrapper pada file: screens/Forum/DetailForum.tsx
|
|
||||||
Component yang digunakan: components/_ShareComponent/NewWrapper.tsx , karena ini adalah halaman detail saya ingin anda fokus pada props pada NewWrapper. Seperti
|
|
||||||
2
eas.json
2
eas.json
@@ -11,7 +11,7 @@
|
|||||||
"preview": {
|
"preview": {
|
||||||
"distribution": "internal",
|
"distribution": "internal",
|
||||||
"android": {
|
"android": {
|
||||||
"buildType": "apk"
|
"buildType": "app-bundle"
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios": {
|
||||||
"simulator": false
|
"simulator": false
|
||||||
|
|||||||
@@ -1,517 +0,0 @@
|
|||||||
# 📱 Reusable Pagination untuk React Native + Expo
|
|
||||||
|
|
||||||
Komponen pagination yang terintegrasi dengan **NewWrapper** untuk infinite scroll, pull-to-refresh, skeleton loading, dan empty state.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📦 File Structure
|
|
||||||
|
|
||||||
```
|
|
||||||
/hooks/
|
|
||||||
└── usePagination.tsx # Custom hook untuk logika pagination
|
|
||||||
|
|
||||||
/helpers/
|
|
||||||
└── paginationHelpers.tsx # Helper functions untuk komponen UI
|
|
||||||
|
|
||||||
/components/
|
|
||||||
└── NewWrapper.tsx # Komponen wrapper utama (existing)
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 Cara Penggunaan
|
|
||||||
|
|
||||||
### **Step 1: Import Hook dan Helpers**
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
import { usePagination } from "@/hooks/usePagination";
|
|
||||||
import { createPaginationComponents } from "@/helpers/paginationHelpers";
|
|
||||||
import NewWrapper from "@/components/_ShareComponent/NewWrapper";
|
|
||||||
```
|
|
||||||
|
|
||||||
### **Step 2: Setup Pagination Hook**
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
const pagination = usePagination({
|
|
||||||
// ✅ Fungsi untuk fetch data (harus return { data: T[] })
|
|
||||||
fetchFunction: async (page, searchQuery) => {
|
|
||||||
return await apiForumGetAll({
|
|
||||||
category: "beranda",
|
|
||||||
search: searchQuery || "",
|
|
||||||
userLoginId: user.id,
|
|
||||||
page: String(page),
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// ✅ Page size (harus sama dengan API)
|
|
||||||
pageSize: 5,
|
|
||||||
|
|
||||||
// ✅ Query pencarian
|
|
||||||
searchQuery: search,
|
|
||||||
|
|
||||||
// ✅ Dependencies (reload saat berubah)
|
|
||||||
dependencies: [user?.id, category],
|
|
||||||
|
|
||||||
// ⚙️ Optional callbacks
|
|
||||||
onDataFetched: (data) => console.log("Loaded:", data.length),
|
|
||||||
onError: (error) => console.error("Error:", error),
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### **Step 3: Generate Komponen Pagination**
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
const { ListEmptyComponent, ListFooterComponent } = createPaginationComponents({
|
|
||||||
loading: pagination.loading,
|
|
||||||
refreshing: pagination.refreshing,
|
|
||||||
listData: pagination.listData,
|
|
||||||
searchQuery: search,
|
|
||||||
emptyMessage: "Tidak ada data",
|
|
||||||
emptySearchMessage: "Tidak ada hasil pencarian",
|
|
||||||
skeletonCount: 5,
|
|
||||||
skeletonHeight: 200,
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### **Step 4: Gunakan dengan NewWrapper**
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
<NewWrapper
|
|
||||||
// Props dari pagination hook
|
|
||||||
listData={pagination.listData}
|
|
||||||
refreshControl={
|
|
||||||
<RefreshControl
|
|
||||||
refreshing={pagination.refreshing}
|
|
||||||
onRefresh={pagination.onRefresh}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onEndReached={pagination.loadMore}
|
|
||||||
|
|
||||||
// Komponen dari helpers
|
|
||||||
ListEmptyComponent={ListEmptyComponent}
|
|
||||||
ListFooterComponent={ListFooterComponent}
|
|
||||||
|
|
||||||
// Render item
|
|
||||||
renderItem={({ item }) => <YourComponent data={item} />}
|
|
||||||
|
|
||||||
// Props lain dari NewWrapper
|
|
||||||
headerComponent={<SearchInput />}
|
|
||||||
floatingButton={<FloatingButton />}
|
|
||||||
/>
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📖 Contoh Implementasi Lengkap
|
|
||||||
|
|
||||||
### **Contoh 1: Forum Page (Basic)**
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
import { usePagination } from "@/hooks/usePagination";
|
|
||||||
import { createPaginationComponents } from "@/helpers/paginationHelpers";
|
|
||||||
import NewWrapper from "@/components/_ShareComponent/NewWrapper";
|
|
||||||
import { MainColor } from "@/constants/color-palet";
|
|
||||||
|
|
||||||
export default function ForumPage() {
|
|
||||||
const { user } = useAuth();
|
|
||||||
const [search, setSearch] = useState("");
|
|
||||||
|
|
||||||
// Setup pagination
|
|
||||||
const pagination = usePagination({
|
|
||||||
fetchFunction: async (page, searchQuery) => {
|
|
||||||
if (!user?.id) return { data: [] };
|
|
||||||
|
|
||||||
return await apiForumGetAll({
|
|
||||||
category: "beranda",
|
|
||||||
search: searchQuery || "",
|
|
||||||
userLoginId: user.id,
|
|
||||||
page: String(page),
|
|
||||||
});
|
|
||||||
},
|
|
||||||
pageSize: 5,
|
|
||||||
searchQuery: search,
|
|
||||||
dependencies: [user?.id],
|
|
||||||
});
|
|
||||||
|
|
||||||
// Generate komponen
|
|
||||||
const { ListEmptyComponent, ListFooterComponent } = createPaginationComponents({
|
|
||||||
loading: pagination.loading,
|
|
||||||
refreshing: pagination.refreshing,
|
|
||||||
listData: pagination.listData,
|
|
||||||
searchQuery: search,
|
|
||||||
emptyMessage: "Tidak ada diskusi",
|
|
||||||
emptySearchMessage: "Tidak ada hasil pencarian",
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<NewWrapper
|
|
||||||
headerComponent={
|
|
||||||
<SearchInput
|
|
||||||
placeholder="Cari diskusi..."
|
|
||||||
onChangeText={_.debounce(setSearch, 500)}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
listData={pagination.listData}
|
|
||||||
renderItem={({ item }) => <ForumItem data={item} />}
|
|
||||||
refreshControl={
|
|
||||||
<RefreshControl
|
|
||||||
tintColor={MainColor.yellow}
|
|
||||||
refreshing={pagination.refreshing}
|
|
||||||
onRefresh={pagination.onRefresh}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onEndReached={pagination.loadMore}
|
|
||||||
ListEmptyComponent={ListEmptyComponent}
|
|
||||||
ListFooterComponent={ListFooterComponent}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### **Contoh 2: Product Page (Dengan Filter)**
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
export default function ProductPage() {
|
|
||||||
const [search, setSearch] = useState("");
|
|
||||||
const [category, setCategory] = useState("all");
|
|
||||||
|
|
||||||
const pagination = usePagination({
|
|
||||||
fetchFunction: async (page, searchQuery) => {
|
|
||||||
return await apiProductGetAll({
|
|
||||||
page: String(page),
|
|
||||||
search: searchQuery || "",
|
|
||||||
category: category !== "all" ? category : undefined,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
pageSize: 10,
|
|
||||||
searchQuery: search,
|
|
||||||
dependencies: [category], // Reload saat category berubah
|
|
||||||
});
|
|
||||||
|
|
||||||
const { ListEmptyComponent, ListFooterComponent } = createPaginationComponents({
|
|
||||||
loading: pagination.loading,
|
|
||||||
refreshing: pagination.refreshing,
|
|
||||||
listData: pagination.listData,
|
|
||||||
searchQuery: search,
|
|
||||||
emptyMessage: "Belum ada produk",
|
|
||||||
skeletonCount: 8,
|
|
||||||
skeletonHeight: 100,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<NewWrapper
|
|
||||||
headerComponent={
|
|
||||||
<View>
|
|
||||||
<SearchInput onChangeText={setSearch} />
|
|
||||||
<CategoryFilter value={category} onChange={setCategory} />
|
|
||||||
</View>
|
|
||||||
}
|
|
||||||
listData={pagination.listData}
|
|
||||||
renderItem={({ item }) => <ProductCard product={item} />}
|
|
||||||
refreshControl={
|
|
||||||
<RefreshControl
|
|
||||||
refreshing={pagination.refreshing}
|
|
||||||
onRefresh={pagination.onRefresh}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onEndReached={pagination.loadMore}
|
|
||||||
ListEmptyComponent={ListEmptyComponent}
|
|
||||||
ListFooterComponent={ListFooterComponent}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⚙️ API Reference
|
|
||||||
|
|
||||||
### **usePagination Hook**
|
|
||||||
|
|
||||||
#### Props
|
|
||||||
|
|
||||||
| Prop | Type | Required | Default | Deskripsi |
|
|
||||||
|------|------|----------|---------|-----------|
|
|
||||||
| `fetchFunction` | `(page, search?) => Promise<{data: T[]}>` | ✅ | - | Fungsi fetch data dari API |
|
|
||||||
| `pageSize` | `number` | ❌ | `5` | Jumlah data per halaman |
|
|
||||||
| `searchQuery` | `string` | ❌ | `""` | Query pencarian |
|
|
||||||
| `dependencies` | `any[]` | ❌ | `[]` | Dependencies untuk trigger reload |
|
|
||||||
| `onDataFetched` | `(data: T[]) => void` | ❌ | - | Callback saat data berhasil di-fetch |
|
|
||||||
| `onError` | `(error: any) => void` | ❌ | - | Callback saat terjadi error |
|
|
||||||
|
|
||||||
#### Return Value
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
{
|
|
||||||
listData: T[]; // Array data untuk NewWrapper
|
|
||||||
loading: boolean; // Loading state
|
|
||||||
refreshing: boolean; // Refreshing state
|
|
||||||
hasMore: boolean; // Apakah masih ada data
|
|
||||||
page: number; // Current page
|
|
||||||
onRefresh: () => void; // Function untuk refresh
|
|
||||||
loadMore: () => void; // Function untuk load more
|
|
||||||
reset: () => void; // Function untuk reset state
|
|
||||||
setListData: (data) => void; // Function untuk set data manual
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### **createPaginationComponents Helper**
|
|
||||||
|
|
||||||
#### Props
|
|
||||||
|
|
||||||
| Prop | Type | Required | Default | Deskripsi |
|
|
||||||
|------|------|----------|---------|-----------|
|
|
||||||
| `loading` | `boolean` | ✅ | - | Loading state |
|
|
||||||
| `refreshing` | `boolean` | ✅ | - | Refreshing state |
|
|
||||||
| `listData` | `any[]` | ✅ | - | List data |
|
|
||||||
| `searchQuery` | `string` | ❌ | `""` | Query pencarian |
|
|
||||||
| `emptyMessage` | `string` | ❌ | `"Tidak ada data"` | Pesan empty state |
|
|
||||||
| `emptySearchMessage` | `string` | ❌ | `"Tidak ada hasil pencarian"` | Pesan empty saat search |
|
|
||||||
| `skeletonCount` | `number` | ❌ | `5` | Jumlah skeleton items |
|
|
||||||
| `skeletonHeight` | `number` | ❌ | `200` | Tinggi skeleton items |
|
|
||||||
| `loadingFooterText` | `string` | ❌ | - | Text loading footer |
|
|
||||||
|
|
||||||
#### Return Value
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
{
|
|
||||||
ListEmptyComponent: React.ReactElement; // Component untuk empty state
|
|
||||||
ListFooterComponent: React.ReactElement; // Component untuk loading footer
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### **Helper Functions Lain**
|
|
||||||
|
|
||||||
#### `createSkeletonList(options)`
|
|
||||||
Generate skeleton list untuk loading state.
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
const SkeletonComponent = createSkeletonList({
|
|
||||||
count: 5,
|
|
||||||
height: 200
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `createEmptyState(options)`
|
|
||||||
Generate empty state component.
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
const EmptyComponent = createEmptyState({
|
|
||||||
message: "Tidak ada data",
|
|
||||||
searchMessage: "Tidak ada hasil pencarian",
|
|
||||||
searchQuery: search
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `createLoadingFooter(options)`
|
|
||||||
Generate loading footer component.
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
const FooterComponent = createLoadingFooter({
|
|
||||||
show: loading && listData.length > 0,
|
|
||||||
text: "Memuat data..."
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🎨 Custom Components
|
|
||||||
|
|
||||||
### **Custom Empty State**
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
import { createSkeletonList } from "@/helpers/paginationHelpers";
|
|
||||||
|
|
||||||
const CustomEmpty = (
|
|
||||||
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
|
|
||||||
<Text>🔍</Text>
|
|
||||||
<TextCustom>Data tidak ditemukan</TextCustom>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
|
|
||||||
const ListEmptyComponent =
|
|
||||||
pagination.loading && pagination.listData.length === 0
|
|
||||||
? createSkeletonList({ count: 5, height: 200 })
|
|
||||||
: CustomEmpty;
|
|
||||||
|
|
||||||
<NewWrapper
|
|
||||||
ListEmptyComponent={ListEmptyComponent}
|
|
||||||
// ...
|
|
||||||
/>
|
|
||||||
```
|
|
||||||
|
|
||||||
### **Custom Loading Footer**
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
import { createLoadingFooter } from "@/helpers/paginationHelpers";
|
|
||||||
|
|
||||||
const CustomFooter = createLoadingFooter({
|
|
||||||
show: pagination.loading && !pagination.refreshing && pagination.listData.length > 0,
|
|
||||||
customComponent: (
|
|
||||||
<View style={{ padding: 20, alignItems: "center" }}>
|
|
||||||
<ActivityIndicator size="large" color="#007AFF" />
|
|
||||||
<Text style={{ marginTop: 8 }}>Loading more...</Text>
|
|
||||||
</View>
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
<NewWrapper
|
|
||||||
ListFooterComponent={CustomFooter}
|
|
||||||
// ...
|
|
||||||
/>
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ✨ Fitur-Fitur
|
|
||||||
|
|
||||||
✅ **Infinite Scroll** - Auto load saat scroll ke bawah
|
|
||||||
✅ **Pull to Refresh** - Swipe down untuk refresh
|
|
||||||
✅ **Skeleton Loading** - Smooth loading animation
|
|
||||||
✅ **Empty State** - Tampilan saat data kosong
|
|
||||||
✅ **Search Integration** - Support search dengan debounce
|
|
||||||
✅ **Multi Dependencies** - Reload berdasarkan filter apapun
|
|
||||||
✅ **Error Handling** - Built-in error handling
|
|
||||||
✅ **TypeScript** - Full type safety
|
|
||||||
✅ **Fully Customizable** - Custom components untuk semua state
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🎯 Best Practices
|
|
||||||
|
|
||||||
### 1. **Gunakan Debounce untuk Search**
|
|
||||||
```tsx
|
|
||||||
<SearchInput
|
|
||||||
onChangeText={_.debounce((text) => setSearch(text), 500)}
|
|
||||||
/>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. **Sesuaikan Page Size dengan API**
|
|
||||||
```tsx
|
|
||||||
const pagination = usePagination({
|
|
||||||
pageSize: 5, // Harus sama dengan takeData di API
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. **Tambahkan Dependencies yang Relevan**
|
|
||||||
```tsx
|
|
||||||
const pagination = usePagination({
|
|
||||||
dependencies: [userId, category, sortBy], // Reload saat berubah
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. **Handle Error dengan Baik**
|
|
||||||
```tsx
|
|
||||||
const pagination = usePagination({
|
|
||||||
onError: (error) => {
|
|
||||||
console.error("Error:", error);
|
|
||||||
Alert.alert("Error", "Gagal memuat data");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5. **Pastikan API Return Format yang Benar**
|
|
||||||
```tsx
|
|
||||||
// ❌ SALAH
|
|
||||||
fetchFunction: async () => [data1, data2];
|
|
||||||
|
|
||||||
// ✅ BENAR
|
|
||||||
fetchFunction: async () => ({ data: [data1, data2] });
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 Troubleshooting
|
|
||||||
|
|
||||||
### **Data tidak muncul?**
|
|
||||||
- Pastikan `fetchFunction` return `{ data: T[] }`
|
|
||||||
- Cek apakah API return format yang benar
|
|
||||||
- Pastikan `pageSize` sesuai dengan API
|
|
||||||
|
|
||||||
### **Infinite scroll tidak jalan?**
|
|
||||||
- Pastikan API return data sesuai `pageSize`
|
|
||||||
- Cek `hasMore` state
|
|
||||||
- Pastikan `onEndReachedThreshold` tidak terlalu kecil (default 0.5)
|
|
||||||
|
|
||||||
### **Skeleton terus muncul?**
|
|
||||||
- Cek `loading` state
|
|
||||||
- Pastikan `fetchFunction` resolve dengan benar
|
|
||||||
- Cek error di console
|
|
||||||
|
|
||||||
### **Refresh tidak bekerja?**
|
|
||||||
- Pastikan `RefreshControl` menggunakan `pagination.refreshing` dan `pagination.onRefresh`
|
|
||||||
- Cek apakah API dipanggil saat pull-to-refresh
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📝 Migration Guide
|
|
||||||
|
|
||||||
### **Dari Code Lama ke Code Baru**
|
|
||||||
|
|
||||||
#### **BEFORE:**
|
|
||||||
```tsx
|
|
||||||
const [listData, setListData] = useState([]);
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
|
||||||
const [hasMore, setHasMore] = useState(true);
|
|
||||||
const [page, setPage] = useState(1);
|
|
||||||
|
|
||||||
const fetchData = async (pageNumber, clear) => {
|
|
||||||
// ... 30+ lines of code
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setPage(1);
|
|
||||||
setListData([]);
|
|
||||||
setHasMore(true);
|
|
||||||
fetchData(1, true);
|
|
||||||
}, [search, user?.id]);
|
|
||||||
|
|
||||||
const onRefresh = useCallback(() => {
|
|
||||||
fetchData(1, true);
|
|
||||||
}, [search, user?.id]);
|
|
||||||
|
|
||||||
const loadMore = useCallback(() => {
|
|
||||||
if (hasMore && !loading && !refreshing) {
|
|
||||||
fetchData(page + 1, false);
|
|
||||||
}
|
|
||||||
}, [hasMore, loading, refreshing, page, search, user?.id]);
|
|
||||||
|
|
||||||
// ... skeleton, empty, footer components
|
|
||||||
```
|
|
||||||
|
|
||||||
#### **AFTER:**
|
|
||||||
```tsx
|
|
||||||
const pagination = usePagination({
|
|
||||||
fetchFunction: async (page, search) => await apiGetData({ page, search }),
|
|
||||||
pageSize: 5,
|
|
||||||
searchQuery: search,
|
|
||||||
dependencies: [user?.id]
|
|
||||||
});
|
|
||||||
|
|
||||||
const { ListEmptyComponent, ListFooterComponent } = createPaginationComponents({
|
|
||||||
loading: pagination.loading,
|
|
||||||
refreshing: pagination.refreshing,
|
|
||||||
listData: pagination.listData,
|
|
||||||
searchQuery: search,
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
**Result:** 50+ lines → 15 lines! 🎉
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 👨💻 Author
|
|
||||||
|
|
||||||
Created by Full-Stack Developer
|
|
||||||
React Native + Expo Specialist
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📄 License
|
|
||||||
|
|
||||||
MIT License - Feel free to use in your projects!
|
|
||||||
@@ -1,280 +0,0 @@
|
|||||||
import { View } from "react-native";
|
|
||||||
import { LoaderCustom, TextCustom, StackCustom } from "@/components";
|
|
||||||
import SkeletonCustom from "@/components/_ShareComponent/SkeletonCustom";
|
|
||||||
import _ from "lodash";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pagination Helpers
|
|
||||||
*
|
|
||||||
* Helper functions untuk membuat komponen-komponen pagination
|
|
||||||
* yang sering digunakan (Skeleton, Empty State, Loading Footer)
|
|
||||||
*/
|
|
||||||
|
|
||||||
interface SkeletonListOptions {
|
|
||||||
/**
|
|
||||||
* Jumlah skeleton items
|
|
||||||
* @default 5
|
|
||||||
*/
|
|
||||||
count?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tinggi setiap skeleton item
|
|
||||||
* @default 200
|
|
||||||
*/
|
|
||||||
height?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate Skeleton List Component untuk loading state
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```tsx
|
|
||||||
* <NewWrapper
|
|
||||||
* listData={listData}
|
|
||||||
* ListEmptyComponent={
|
|
||||||
* loading && _.isEmpty(listData)
|
|
||||||
* ? createSkeletonList({ count: 5, height: 200 })
|
|
||||||
* : createEmptyState({ message: "Tidak ada data" })
|
|
||||||
* }
|
|
||||||
* />
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
export const createSkeletonList = (options: SkeletonListOptions = {}) => {
|
|
||||||
const { count = 5, height = 200 } = options;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View style={{ flex: 1 }}>
|
|
||||||
<StackCustom>
|
|
||||||
{Array.from({ length: count }).map((_, i) => (
|
|
||||||
<SkeletonCustom height={height} key={i} />
|
|
||||||
))}
|
|
||||||
</StackCustom>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
interface EmptyStateOptions {
|
|
||||||
/**
|
|
||||||
* Pesan untuk empty state
|
|
||||||
* @default "Tidak ada data"
|
|
||||||
*/
|
|
||||||
message?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pesan untuk empty state saat search
|
|
||||||
*/
|
|
||||||
searchMessage?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Query pencarian (untuk menentukan pesan mana yang ditampilkan)
|
|
||||||
*/
|
|
||||||
searchQuery?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom component untuk empty state
|
|
||||||
*/
|
|
||||||
customComponent?: React.ReactElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate Empty State Component
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```tsx
|
|
||||||
* ListEmptyComponent={
|
|
||||||
* createEmptyState({
|
|
||||||
* message: "Tidak ada diskusi",
|
|
||||||
* searchMessage: "Tidak ada hasil pencarian",
|
|
||||||
* searchQuery: search
|
|
||||||
* })
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
export const createEmptyState = (options: EmptyStateOptions = {}) => {
|
|
||||||
const {
|
|
||||||
message = "Tidak ada data",
|
|
||||||
searchMessage = "Tidak ada hasil pencarian",
|
|
||||||
searchQuery = "",
|
|
||||||
customComponent,
|
|
||||||
} = options;
|
|
||||||
|
|
||||||
if (customComponent) return customComponent;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
flex: 1,
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
padding: 20,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<TextCustom align="center" color="gray">
|
|
||||||
{searchQuery ? searchMessage : message}
|
|
||||||
</TextCustom>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
interface LoadingFooterOptions {
|
|
||||||
/**
|
|
||||||
* Tampilkan loading footer
|
|
||||||
*/
|
|
||||||
show: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom text untuk loading footer
|
|
||||||
*/
|
|
||||||
text?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom component untuk loading footer
|
|
||||||
*/
|
|
||||||
customComponent?: React.ReactElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate Loading Footer Component
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```tsx
|
|
||||||
* ListFooterComponent={
|
|
||||||
* createLoadingFooter({
|
|
||||||
* show: loading && !refreshing && listData.length > 0,
|
|
||||||
* text: "Memuat data..."
|
|
||||||
* })
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
export const createLoadingFooter = (options: LoadingFooterOptions) => {
|
|
||||||
const { show, text, customComponent } = options;
|
|
||||||
|
|
||||||
if (!show) return null;
|
|
||||||
|
|
||||||
if (customComponent) return customComponent;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View style={{ paddingVertical: 16, alignItems: "center" }}>
|
|
||||||
{text ? (
|
|
||||||
<TextCustom color="gray">
|
|
||||||
{text}
|
|
||||||
</TextCustom>
|
|
||||||
) : (
|
|
||||||
<LoaderCustom />
|
|
||||||
)}
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
interface PaginationComponentsOptions {
|
|
||||||
/**
|
|
||||||
* Loading state
|
|
||||||
*/
|
|
||||||
loading: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Refreshing state
|
|
||||||
*/
|
|
||||||
refreshing: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List data
|
|
||||||
*/
|
|
||||||
listData: any[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Query pencarian
|
|
||||||
*/
|
|
||||||
searchQuery?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pesan empty state
|
|
||||||
*/
|
|
||||||
emptyMessage?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pesan empty state saat search
|
|
||||||
*/
|
|
||||||
emptySearchMessage?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Jumlah skeleton items
|
|
||||||
*/
|
|
||||||
skeletonCount?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tinggi skeleton items
|
|
||||||
*/
|
|
||||||
skeletonHeight?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Text loading footer
|
|
||||||
*/
|
|
||||||
loadingFooterText?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loading pertama
|
|
||||||
*/
|
|
||||||
isInitialLoad?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate semua komponen pagination sekaligus
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```tsx
|
|
||||||
* const { ListEmptyComponent, ListFooterComponent } = createPaginationComponents({
|
|
||||||
* loading,
|
|
||||||
* refreshing,
|
|
||||||
* listData,
|
|
||||||
* searchQuery: search,
|
|
||||||
* emptyMessage: "Tidak ada diskusi",
|
|
||||||
* emptySearchMessage: "Tidak ada hasil pencarian",
|
|
||||||
* skeletonCount: 5,
|
|
||||||
* skeletonHeight: 200
|
|
||||||
* });
|
|
||||||
*
|
|
||||||
* <NewWrapper
|
|
||||||
* listData={listData}
|
|
||||||
* ListEmptyComponent={ListEmptyComponent}
|
|
||||||
* ListFooterComponent={ListFooterComponent}
|
|
||||||
* />
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
export const createPaginationComponents = (
|
|
||||||
options: PaginationComponentsOptions
|
|
||||||
) => {
|
|
||||||
const {
|
|
||||||
loading,
|
|
||||||
refreshing,
|
|
||||||
listData,
|
|
||||||
searchQuery = "",
|
|
||||||
emptyMessage = "Tidak ada data",
|
|
||||||
emptySearchMessage = "Tidak ada hasil pencarian",
|
|
||||||
skeletonCount = 5,
|
|
||||||
skeletonHeight = 200,
|
|
||||||
loadingFooterText,
|
|
||||||
isInitialLoad,
|
|
||||||
} = options;
|
|
||||||
|
|
||||||
// Empty Compotnent: Skeleton saat loading pertama, Empty State saat data kosong
|
|
||||||
const ListEmptyComponent =
|
|
||||||
loading && _.isEmpty(listData)
|
|
||||||
? createSkeletonList({ count: skeletonCount, height: skeletonHeight })
|
|
||||||
: createEmptyState({
|
|
||||||
message: emptyMessage,
|
|
||||||
searchMessage: emptySearchMessage,
|
|
||||||
searchQuery,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Footer Component: Loading indicator saat load more
|
|
||||||
const ListFooterComponent = createLoadingFooter({
|
|
||||||
show: loading && !refreshing && listData.length > 0,
|
|
||||||
text: loadingFooterText,
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
ListEmptyComponent,
|
|
||||||
ListFooterComponent,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -13,13 +13,3 @@ Exp: open ios/HIPMIBADUNG.xcworkspace
|
|||||||
perubahan versi : npm version patch
|
perubahan versi : npm version patch
|
||||||
ios: bunx expo prebuild --platform ios
|
ios: bunx expo prebuild --platform ios
|
||||||
android: bunx expo prebuild --platform android
|
android: bunx expo prebuild --platform android
|
||||||
|
|
||||||
### Android
|
|
||||||
adb devices : cek device yang terhubung
|
|
||||||
Note: izinkan perangkat dulu agar statusnya tidak unauthorized
|
|
||||||
|
|
||||||
adb install android/app/build/outputs/apk/debug/app-debug.apk : install apk ke device / emulator
|
|
||||||
Note:
|
|
||||||
Gunakan flag -s (serial) di perintah adb untuk menentukan target
|
|
||||||
adb -s <0G52319V261040B2 ini adalah id nya> install android/app/build/outputs/apk/debug/app-debug.apk
|
|
||||||
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import { useEffect } from "react";
|
|
||||||
import {
|
|
||||||
getMessaging,
|
|
||||||
onMessage,
|
|
||||||
FirebaseMessagingTypes,
|
|
||||||
} from "@react-native-firebase/messaging";
|
|
||||||
import { useAuth } from "./use-auth";
|
|
||||||
|
|
||||||
// Gunakan tipe resmi dari library
|
|
||||||
type RemoteMessage = FirebaseMessagingTypes.RemoteMessage;
|
|
||||||
|
|
||||||
export function useForegroundNotifications(
|
|
||||||
onMessageReceived: (message: RemoteMessage) => void
|
|
||||||
) {
|
|
||||||
const { user } = useAuth();
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const messaging = getMessaging();
|
|
||||||
|
|
||||||
const unsubscribe = onMessage(messaging, (remoteMessage) => {
|
|
||||||
const data = remoteMessage.data;
|
|
||||||
// console.log("DATA NOTIFIKASI DARI SERVER", data)
|
|
||||||
if (data?.recipientId && data?.recipientId !== user?.id) {
|
|
||||||
console.log("📵 Notification untuk user lain", data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(
|
|
||||||
"🔔 Notifikasi diterima saat app aktif:",
|
|
||||||
JSON.stringify(data, null, 2)
|
|
||||||
);
|
|
||||||
onMessageReceived(remoteMessage);
|
|
||||||
});
|
|
||||||
|
|
||||||
return unsubscribe;
|
|
||||||
}, [user?.id, onMessageReceived]);
|
|
||||||
}
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
// hooks/useNotificationStore.ts
|
|
||||||
import {
|
|
||||||
apiNotificationMarkAsRead,
|
|
||||||
apiNotificationUnreadCount,
|
|
||||||
} from "@/service/api-notifications";
|
|
||||||
import {
|
|
||||||
createContext,
|
|
||||||
ReactNode,
|
|
||||||
useContext,
|
|
||||||
useEffect,
|
|
||||||
useState,
|
|
||||||
} from "react";
|
|
||||||
import { useAuth } from "./use-auth";
|
|
||||||
|
|
||||||
type AppNotification = {
|
|
||||||
id: string;
|
|
||||||
title: string;
|
|
||||||
body: string;
|
|
||||||
data?: Record<string, string>;
|
|
||||||
isRead: boolean;
|
|
||||||
timestamp: number;
|
|
||||||
type: "announcement" | "trigger";
|
|
||||||
// untuk id dari setiap kategori app
|
|
||||||
appId?: string;
|
|
||||||
kategoriApp?:
|
|
||||||
| "JOB"
|
|
||||||
| "VOTING"
|
|
||||||
| "EVENT"
|
|
||||||
| "DONASI"
|
|
||||||
| "INVESTASI"
|
|
||||||
| "COLLABORATION"
|
|
||||||
| "FORUM"
|
|
||||||
| "ACCESS"; // Untuk trigger akses user;
|
|
||||||
};
|
|
||||||
|
|
||||||
type NotificationContextType = {
|
|
||||||
notifications: AppNotification[];
|
|
||||||
unreadCount: number;
|
|
||||||
addNotification: (
|
|
||||||
notif: Omit<AppNotification, "id" | "isRead" | "timestamp">
|
|
||||||
) => void;
|
|
||||||
markAsRead: (id: string) => void;
|
|
||||||
markAsReadAll: (id: string) => void;
|
|
||||||
syncUnreadCount: () => Promise<void>;
|
|
||||||
};
|
|
||||||
|
|
||||||
const NotificationContext = createContext<NotificationContextType>({
|
|
||||||
notifications: [],
|
|
||||||
unreadCount: 0,
|
|
||||||
addNotification: () => {},
|
|
||||||
markAsRead: () => {},
|
|
||||||
markAsReadAll: () => {},
|
|
||||||
syncUnreadCount: async () => {},
|
|
||||||
});
|
|
||||||
|
|
||||||
export const NotificationProvider = ({ children }: { children: ReactNode }) => {
|
|
||||||
const { user } = useAuth();
|
|
||||||
const [notifications, setNotifications] = useState<AppNotification[]>([]);
|
|
||||||
const [unreadCount, setUnreadCount] = useState(0);
|
|
||||||
|
|
||||||
console.log(
|
|
||||||
"🚀 Notifications Masuk:",
|
|
||||||
JSON.stringify(notifications, null, 2)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Sync unread count dari backend saat provider di-mount
|
|
||||||
useEffect(() => {
|
|
||||||
fetchUnreadCount();
|
|
||||||
}, [user?.id]);
|
|
||||||
|
|
||||||
const fetchUnreadCount = async () => {
|
|
||||||
try {
|
|
||||||
const count = await apiNotificationUnreadCount({
|
|
||||||
id: user?.id as any,
|
|
||||||
role: user?.masterUserRoleId as any,
|
|
||||||
}); // ← harus return number
|
|
||||||
const result = count.data;
|
|
||||||
console.log("📖 Unread count:", result);
|
|
||||||
setUnreadCount(result);
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Gagal fetch unread count:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const addNotification = (
|
|
||||||
notif: Omit<AppNotification, "id" | "isRead" | "timestamp">
|
|
||||||
) => {
|
|
||||||
setNotifications((prev) => [
|
|
||||||
{
|
|
||||||
...notif,
|
|
||||||
id: Date.now().toString(),
|
|
||||||
isRead: false,
|
|
||||||
timestamp: Date.now(),
|
|
||||||
},
|
|
||||||
...prev,
|
|
||||||
]);
|
|
||||||
|
|
||||||
setUnreadCount((prev) => prev + 1);
|
|
||||||
};
|
|
||||||
|
|
||||||
const markAsRead = async (id: string) => {
|
|
||||||
try {
|
|
||||||
const response = await apiNotificationMarkAsRead({ id, category: "one" });
|
|
||||||
console.log("🚀 Response Mark As Read:", response);
|
|
||||||
|
|
||||||
if (response.success) {
|
|
||||||
const cloneNotifications = [...notifications];
|
|
||||||
const index = cloneNotifications.findIndex((n) => n?.data?.id === id);
|
|
||||||
if (index !== -1) {
|
|
||||||
cloneNotifications[index].isRead = true;
|
|
||||||
setNotifications(cloneNotifications);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Gagal mark as read:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const markAsReadAll = async (id: string) => {
|
|
||||||
try {
|
|
||||||
const response = await apiNotificationMarkAsRead({ id, category: "all" });
|
|
||||||
console.log("🚀 Response Mark As Read All:", response);
|
|
||||||
|
|
||||||
if (response.success) {
|
|
||||||
const cloneNotifications = [...notifications];
|
|
||||||
const index = cloneNotifications.findIndex((n) => n?.data?.id === id);
|
|
||||||
if (index !== -1) {
|
|
||||||
cloneNotifications[index].isRead = true;
|
|
||||||
setNotifications(cloneNotifications);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Gagal mark as read:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const syncUnreadCount = async () => {
|
|
||||||
try {
|
|
||||||
const count = await apiNotificationUnreadCount({
|
|
||||||
id: user?.id as any,
|
|
||||||
role: user?.masterUserRoleId as any,
|
|
||||||
}); // ← harus return number
|
|
||||||
const result = count.data;
|
|
||||||
console.log("📖 Unread count sync:", result);
|
|
||||||
setUnreadCount(result);
|
|
||||||
} catch (error) {
|
|
||||||
console.warn("⚠️ Gagal sync unread count:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<NotificationContext.Provider
|
|
||||||
value={{
|
|
||||||
notifications,
|
|
||||||
addNotification,
|
|
||||||
unreadCount,
|
|
||||||
markAsRead,
|
|
||||||
markAsReadAll,
|
|
||||||
syncUnreadCount,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</NotificationContext.Provider>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const useNotificationStore = () => useContext(NotificationContext);
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
// hooks/useNotificationStore.ts
|
|
||||||
import { apiGetNotificationsById } from "@/service/api-notifications";
|
|
||||||
import { createContext, ReactNode, useContext, useState, useEffect } from "react";
|
|
||||||
import { useAuth } from "./use-auth";
|
|
||||||
|
|
||||||
type AppNotification = {
|
|
||||||
id: string;
|
|
||||||
title: string;
|
|
||||||
body: string;
|
|
||||||
data?: Record<string, string>;
|
|
||||||
isRead: boolean;
|
|
||||||
timestamp: number;
|
|
||||||
type: "notification" | "trigger";
|
|
||||||
appId?: string;
|
|
||||||
kategoriApp?:
|
|
||||||
| "JOB"
|
|
||||||
| "VOTING"
|
|
||||||
| "EVENT"
|
|
||||||
| "DONASI"
|
|
||||||
| "INVESTASI"
|
|
||||||
| "COLLABORATION"
|
|
||||||
| "FORUM"
|
|
||||||
| "ACCESS";
|
|
||||||
};
|
|
||||||
|
|
||||||
type NotificationContextType = {
|
|
||||||
notifications: AppNotification[];
|
|
||||||
unreadCount: number;
|
|
||||||
addNotification: (
|
|
||||||
notif: Omit<AppNotification, "id" | "isRead" | "timestamp">
|
|
||||||
) => void;
|
|
||||||
markAsRead: (id: string) => void;
|
|
||||||
syncUnreadCount: () => Promise<void>;
|
|
||||||
};
|
|
||||||
|
|
||||||
const NotificationContext = createContext<NotificationContextType>({
|
|
||||||
notifications: [],
|
|
||||||
unreadCount: 0,
|
|
||||||
addNotification: () => {},
|
|
||||||
markAsRead: () => {},
|
|
||||||
syncUnreadCount: async () => {},
|
|
||||||
});
|
|
||||||
|
|
||||||
export const NotificationProvider = ({ children }: { children: ReactNode }) => {
|
|
||||||
const {user} = useAuth()
|
|
||||||
const [notifications, setNotifications] = useState<AppNotification[]>([]);
|
|
||||||
const [unreadCount, setUnreadCount] = useState(0);
|
|
||||||
|
|
||||||
// 🔔 Sync unread count dari backend saat provider di-mount
|
|
||||||
useEffect(() => {
|
|
||||||
const fetchUnreadCount = async () => {
|
|
||||||
try {
|
|
||||||
const count = await apiGetNotificationsById({
|
|
||||||
id: user?.id as any,
|
|
||||||
category: "count-as-unread"
|
|
||||||
}); // ← harus return number
|
|
||||||
const result = count.data
|
|
||||||
setUnreadCount(result);
|
|
||||||
} catch (error) {
|
|
||||||
console.erro("⚠️ Gagal fetch unread count:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
fetchUnreadCount();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const addNotification = (
|
|
||||||
notif: Omit<AppNotification, "id" | "isRead" | "timestamp">
|
|
||||||
) => {
|
|
||||||
setNotifications((prev) => [
|
|
||||||
{
|
|
||||||
...notif,
|
|
||||||
id: Date.now().toString(),
|
|
||||||
isRead: false,
|
|
||||||
timestamp: Date.now(),
|
|
||||||
},
|
|
||||||
...prev,
|
|
||||||
]);
|
|
||||||
// Tambahkan ke unread count (untuk notifikasi foreground)
|
|
||||||
setUnreadCount((prev) => prev + 1);
|
|
||||||
};
|
|
||||||
|
|
||||||
const markAsRead = (id: string) => {
|
|
||||||
setNotifications((prev) =>
|
|
||||||
prev.map((n) => (n.id === id ? { ...n, isRead: true } : n))
|
|
||||||
);
|
|
||||||
// Kurangi unread count
|
|
||||||
setUnreadCount((prev) => Math.max(0, prev - 1));
|
|
||||||
};
|
|
||||||
|
|
||||||
const syncUnreadCount = async () => {
|
|
||||||
try {
|
|
||||||
const count = await apiGetNotificationsById({
|
|
||||||
id: user?.id as any,
|
|
||||||
category: "count-as-unread"
|
|
||||||
}); // ← harus return number
|
|
||||||
const result = count.data
|
|
||||||
setUnreadCount(result);
|
|
||||||
} catch (error) {
|
|
||||||
console.warn("⚠️ Gagal sync unread count:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<NotificationContext.Provider
|
|
||||||
value={{ notifications, unreadCount, addNotification, markAsRead, syncUnreadCount }}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</NotificationContext.Provider>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const useNotificationStore = () => useContext(NotificationContext);
|
|
||||||
@@ -1,184 +0,0 @@
|
|||||||
import { useState, useCallback, useEffect } from "react";
|
|
||||||
|
|
||||||
interface UsePaginationProps<T> {
|
|
||||||
/**
|
|
||||||
* Fungsi API untuk fetch data
|
|
||||||
* @param page - nomor halaman
|
|
||||||
* @param search - query pencarian (opsional)
|
|
||||||
* @returns Promise dengan response API (bukan langsung array)
|
|
||||||
*/
|
|
||||||
fetchFunction: (page: number, search?: string) => Promise<{ data: T[] }>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Jumlah data per halaman (harus sama dengan API)
|
|
||||||
* @default 5
|
|
||||||
*/
|
|
||||||
pageSize?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Query pencarian
|
|
||||||
*/
|
|
||||||
searchQuery?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dependencies tambahan untuk trigger reload
|
|
||||||
* Contoh: [userId, categoryId]
|
|
||||||
*/
|
|
||||||
dependencies?: any[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback saat data berhasil di-fetch
|
|
||||||
*/
|
|
||||||
onDataFetched?: (data: T[]) => void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback saat terjadi error
|
|
||||||
*/
|
|
||||||
onError?: (error: any) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface UsePaginationReturn<T> {
|
|
||||||
// Data state
|
|
||||||
listData: T[];
|
|
||||||
loading: boolean;
|
|
||||||
refreshing: boolean;
|
|
||||||
hasMore: boolean;
|
|
||||||
page: number;
|
|
||||||
|
|
||||||
// Actions
|
|
||||||
onRefresh: () => void;
|
|
||||||
loadMore: () => void;
|
|
||||||
reset: () => void;
|
|
||||||
setListData: React.Dispatch<React.SetStateAction<T[]>>;
|
|
||||||
isInitialLoad: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom Hook untuk menangani pagination dengan infinite scroll
|
|
||||||
*
|
|
||||||
* Hook ini mengembalikan props yang siap digunakan langsung dengan NewWrapper
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```tsx
|
|
||||||
* const pagination = usePagination({
|
|
||||||
* fetchFunction: async (page, search) => {
|
|
||||||
* return await apiForumGetAll({
|
|
||||||
* category: "beranda",
|
|
||||||
* search: search || "",
|
|
||||||
* userLoginId: user.id,
|
|
||||||
* page: String(page),
|
|
||||||
* });
|
|
||||||
* },
|
|
||||||
* pageSize: 5,
|
|
||||||
* searchQuery: search,
|
|
||||||
* dependencies: [user?.id]
|
|
||||||
* });
|
|
||||||
*
|
|
||||||
* // Lalu gunakan langsung di NewWrapper:
|
|
||||||
* <NewWrapper
|
|
||||||
* listData={pagination.listData}
|
|
||||||
* refreshControl={<RefreshControl refreshing={pagination.refreshing} onRefresh={pagination.onRefresh} />}
|
|
||||||
* onEndReached={pagination.loadMore}
|
|
||||||
* // ... props lainnya
|
|
||||||
* />
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
export function usePagination<T = any>({
|
|
||||||
fetchFunction,
|
|
||||||
pageSize = 5,
|
|
||||||
searchQuery = "",
|
|
||||||
dependencies = [],
|
|
||||||
onDataFetched,
|
|
||||||
onError,
|
|
||||||
}: UsePaginationProps<T>): UsePaginationReturn<T> {
|
|
||||||
const [listData, setListData] = useState<T[]>([]);
|
|
||||||
const [loading, setLoading] = useState(true); // Set true untuk initial load
|
|
||||||
const [isInitialLoad, setIsInitialLoad] = useState(true); // Track initial load
|
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
|
||||||
const [hasMore, setHasMore] = useState(true);
|
|
||||||
const [page, setPage] = useState(1);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fungsi utama untuk fetch data
|
|
||||||
*/
|
|
||||||
const fetchData = async (pageNumber: number, clear: boolean) => {
|
|
||||||
// Cegah multiple call
|
|
||||||
if (!clear && (loading || refreshing)) return;
|
|
||||||
|
|
||||||
const isRefresh = clear;
|
|
||||||
if (isRefresh) setRefreshing(true);
|
|
||||||
if (!isRefresh) setLoading(true);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const response = await fetchFunction(pageNumber, searchQuery);
|
|
||||||
const newData = response.data || [];
|
|
||||||
// console.log("newData", newData);
|
|
||||||
setListData((prev) => {
|
|
||||||
const current = Array.isArray(prev) ? prev : [];
|
|
||||||
return clear ? newData : [...current, ...newData];
|
|
||||||
});
|
|
||||||
// setTimeout(() => {
|
|
||||||
// }, 4000);
|
|
||||||
|
|
||||||
setHasMore(newData.length === pageSize);
|
|
||||||
setPage(pageNumber);
|
|
||||||
|
|
||||||
// Callback jika ada
|
|
||||||
onDataFetched?.(newData);
|
|
||||||
} catch (error) {
|
|
||||||
console.error("[usePagination] Error fetching data:", error);
|
|
||||||
setHasMore(false);
|
|
||||||
onError?.(error);
|
|
||||||
} finally {
|
|
||||||
setRefreshing(false);
|
|
||||||
setLoading(false);
|
|
||||||
setIsInitialLoad(false); // Set false setelah initial load
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reset dan reload saat search atau dependencies berubah
|
|
||||||
*/
|
|
||||||
useEffect(() => {
|
|
||||||
reset();
|
|
||||||
fetchData(1, true);
|
|
||||||
}, [searchQuery, ...dependencies]);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pull-to-refresh
|
|
||||||
*/
|
|
||||||
const onRefresh = useCallback(() => {
|
|
||||||
fetchData(1, true);
|
|
||||||
}, [searchQuery, ...dependencies]);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load more (infinite scroll)
|
|
||||||
*/
|
|
||||||
const loadMore = useCallback(() => {
|
|
||||||
if (hasMore && !loading && !refreshing) {
|
|
||||||
fetchData(page + 1, false);
|
|
||||||
}
|
|
||||||
}, [hasMore, loading, refreshing, page, searchQuery, ...dependencies]);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reset state pagination
|
|
||||||
*/
|
|
||||||
const reset = useCallback(() => {
|
|
||||||
setPage(1);
|
|
||||||
setListData([]);
|
|
||||||
setHasMore(true);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return {
|
|
||||||
listData,
|
|
||||||
loading,
|
|
||||||
refreshing,
|
|
||||||
hasMore,
|
|
||||||
page,
|
|
||||||
onRefresh,
|
|
||||||
loadMore,
|
|
||||||
reset,
|
|
||||||
setListData,
|
|
||||||
isInitialLoad
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user