feat: implement full caregiver application feature set including services, availability, profile, and navigation modules

This commit is contained in:
2026-09-02 18:30:45 +05:30
parent 8f2cdfff2f
commit cf82850d1f
28 changed files with 1592 additions and 471 deletions
+33 -6
View File
@@ -2,6 +2,7 @@ import React from 'react';
import { NavigationContainer, DefaultTheme } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { Home, Calendar, Settings } from 'lucide-react-native';
import { HomeScreen } from '../screens/HomeScreen';
@@ -15,13 +16,28 @@ import { AddSkillScreen } from '../screens/AddSkillScreen';
import { AvailabilityListScreen } from '../screens/AvailabilityListScreen';
import { AddAvailabilityScreen } from '../screens/AddAvailabilityScreen';
import { EditAvailabilityScreen } from '../screens/EditAvailabilityScreen';
import { PaymentProfileScreen } from '../screens/PaymentProfileScreen';
import { PaymentProfileListScreen } from '../screens/PaymentProfileListScreen';
import { AddEditPaymentProfileScreen } from '../screens/AddEditPaymentProfileScreen';
import { ManageServicesScreen } from '../screens/ManageServicesScreen';
import { AddEditServiceScreen } from '../screens/AddEditServiceScreen';
import { ProfessionalDocumentsScreen } from '../screens/ProfessionalDocumentsScreen';
import { UploadDocumentScreen } from '../screens/UploadDocumentScreen';
import { ViewDocumentScreen } from '../screens/ViewDocumentScreen';
import { SelectionScreen } from '../screens/SelectionScreen';
import { Service } from '../services/serviceService';
import { navigationRef } from './navigationRef';
export type RootStackParamList = {
Login: undefined;
Selection: {
data: any[];
value: any;
isMulti?: boolean;
searchable?: boolean;
label?: string;
searchPlaceholder?: string;
onSelect: (value: any) => void;
};
MainTabs: undefined;
Profile: { caregiverId: string };
PersonalInformation: undefined;
@@ -34,9 +50,13 @@ export type RootStackParamList = {
start_time: string;
end_time: string;
};
PaymentProfile: undefined;
PaymentProfileList: undefined;
AddEditPaymentProfile: { profile?: any };
ManageServices: undefined;
AddEditService: { service?: Service };
ProfessionalDocuments: undefined;
UploadDocument: undefined;
ViewDocument: { documentId: number };
};
export type TabParamList = {
@@ -49,6 +69,8 @@ const Stack = createNativeStackNavigator<RootStackParamList>();
const Tab = createBottomTabNavigator<TabParamList>();
function MainTabs() {
const insets = useSafeAreaInsets();
return (
<Tab.Navigator
id={undefined}
@@ -59,8 +81,8 @@ function MainTabs() {
borderTopWidth: 0,
elevation: 0,
shadowOpacity: 0,
height: 60,
paddingBottom: 8,
height: 60 + insets.bottom,
paddingBottom: 8 + insets.bottom,
paddingTop: 8,
},
tabBarActiveTintColor: 'navy', // Primary color
@@ -106,7 +128,7 @@ const MyTheme = {
export const AppNavigator = () => {
return (
<NavigationContainer theme={MyTheme}>
<NavigationContainer ref={navigationRef} theme={MyTheme}>
<Stack.Navigator
id={undefined}
initialRouteName="Login"
@@ -124,9 +146,14 @@ export const AppNavigator = () => {
<Stack.Screen name="AvailabilityList" component={AvailabilityListScreen} />
<Stack.Screen name="AddAvailability" component={AddAvailabilityScreen} />
<Stack.Screen name="EditAvailability" component={EditAvailabilityScreen} />
<Stack.Screen name="PaymentProfile" component={PaymentProfileScreen} />
<Stack.Screen name="PaymentProfileList" component={PaymentProfileListScreen} />
<Stack.Screen name="AddEditPaymentProfile" component={AddEditPaymentProfileScreen} />
<Stack.Screen name="ManageServices" component={ManageServicesScreen} />
<Stack.Screen name="AddEditService" component={AddEditServiceScreen} />
<Stack.Screen name="ProfessionalDocuments" component={ProfessionalDocumentsScreen} />
<Stack.Screen name="UploadDocument" component={UploadDocumentScreen} />
<Stack.Screen name="ViewDocument" component={ViewDocumentScreen} />
<Stack.Screen name="Selection" component={SelectionScreen} options={{ presentation: 'card' }} />
</Stack.Navigator>
</NavigationContainer>
);