Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging to check forked PR's locally #232

Merged
merged 63 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
6dbd4ec
create a dropdown for users contribution and displayed users data
JAYATEJA04 Aug 21, 2023
d68da18
added homescreenV2
shreya-mishra Aug 23, 2023
796c572
fix the type issues
shreya-mishra Aug 26, 2023
d6925ad
pused some type changes
shreya-mishra Aug 26, 2023
c4e43ef
create a dropdown for users contribution and displayed users data
JAYATEJA04 Aug 21, 2023
9446796
made few changes in the UI
JAYATEJA04 Aug 30, 2023
c75220c
added the arrows for dropdown
JAYATEJA04 Aug 30, 2023
3d341a9
Added From and To buttons in OOOForm
dhruv036 Aug 31, 2023
a36cf3e
close button added
harshitadatra Aug 31, 2023
d2430a2
made the UI changes, displayed the dates related to deadlines
JAYATEJA04 Sep 1, 2023
326d657
fixed conflicts
JAYATEJA04 Sep 1, 2023
1a6317e
fix: form design
harshitadatra Sep 1, 2023
91dd79e
integrated api
shreya-mishra Sep 2, 2023
9855966
fixed few UI issues and changed the styling of few
JAYATEJA04 Sep 2, 2023
dd9879e
fixed linting issues
JAYATEJA04 Sep 2, 2023
8b5175d
found few issues and resolved it
JAYATEJA04 Sep 2, 2023
b666138
Merge pull request #216 from Real-Dev-Squad/homeScreenEnhance
shreya-mishra Sep 3, 2023
15f6ad3
handled error
shreya-mishra Sep 3, 2023
ef5a7ac
Merge pull request #231 from Real-Dev-Squad/homeScreenEnhance
shreya-mishra Sep 3, 2023
122545d
Merge branch 'Real-Dev-Squad:develop' into homeScreenEnhance
dhruv036 Sep 3, 2023
9f4d557
fix : form design
harshitadatra Sep 3, 2023
4fe7e8a
Merge pull request #228 from dhruv036/homeScreenEnhance
shreya-mishra Sep 3, 2023
5021374
merge conflicts
harshitadatra Sep 3, 2023
44b36d3
resolved date picker ui and handled validation in case of currentDate…
shreya-mishra Sep 4, 2023
ad9ed65
added encrypted storage methods
Sep 4, 2023
de0f6da
removing unused import
Sep 4, 2023
bb7dbfe
fix: merge conflicts
harshitadatra Sep 5, 2023
c9d7f23
Fixed scanner 'Something Went Wrong' toast on signup screen
dhruv036 Sep 6, 2023
af76584
Merge pull request #204 from JAYATEJA04/188/profileEnhancement
shreya-mishra Sep 7, 2023
95cf3e2
Merge branch 'staging' into formDesign
shreya-mishra Sep 7, 2023
584363a
Merge pull request #229 from harshitadatra/formDesign
shreya-mishra Sep 7, 2023
2e1aa34
Merge pull request #236 from mohammadkhizerkhan/feature/storage-token
shreya-mishra Sep 7, 2023
9de3f3e
Merge pull request #241 from dhruv036/staging
shreya-mishra Sep 7, 2023
466c79c
changes
shreya-mishra Sep 7, 2023
97056d4
changes
shreya-mishra Sep 7, 2023
b773783
changes
shreya-mishra Sep 7, 2023
532bd13
made some ui fixes at homescreen
shreya-mishra Sep 7, 2023
8bc7bbd
fix : infinite loading
harshitadatra Sep 13, 2023
e7e72f2
Styling in OOOForm and GoalScreen
dhruv036 Sep 15, 2023
cce3b7b
linting
dhruv036 Sep 15, 2023
8814e00
added local feautre flag
Sep 6, 2023
190d7b4
importing from updated api url from main store
Sep 6, 2023
eccc139
moving prod and stag url in contants
Sep 7, 2023
deda4bd
removing urls and maintaining boolean
Sep 13, 2023
3b6cdf9
hiding goal tab accordingly with feature flag
Sep 17, 2023
2bd346b
Merge pull request #254 from mohammadkhizerkhan/feature/local-feature…
shreya-mishra Sep 18, 2023
a152a11
Merge pull request #251 from harshitadatra/fix/infinite-loading
shreya-mishra Sep 18, 2023
962fc4c
Merge pull request #252 from dhruv036/staging
shreya-mishra Sep 18, 2023
f804a47
fix between dev and prod features
shreya-mishra Oct 2, 2023
0c08027
Merge branch 'develop' into staging
shreya-mishra Oct 3, 2023
ac387aa
updated the tokenFix api-updated
shreya-mishra Oct 4, 2023
779f5c7
remove log
shreya-mishra Oct 4, 2023
5f79ef8
fixed scanner
shreya-mishra Oct 4, 2023
a24f36b
remove log
shreya-mishra Oct 4, 2023
6911b3b
Merge pull request #275 from Real-Dev-Squad/tokenFixAiUpdated
shreya-mishra Oct 4, 2023
b8729ff
fix api token issue
shreya-mishra Oct 4, 2023
5eca315
fix api token issue
shreya-mishra Oct 4, 2023
ba72b5c
lint fix
shreya-mishra Oct 4, 2023
385ba86
Merge pull request #276 from Real-Dev-Squad/tokenFixAiUpdated
shreya-mishra Oct 4, 2023
62e4f96
lint fix
shreya-mishra Oct 4, 2023
a426e9f
Merge pull request #278 from Real-Dev-Squad/tokenFixAiUpdated
shreya-mishra Oct 4, 2023
b96e5f9
build: add androidx.appcompat
ShivangiTiwari10 Oct 7, 2023
0810f40
Merge pull request #281 from ShivangiTiwari10/fix/OOOcrash
shreya-mishra Oct 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import rootSaga from './src/sagas/rootSaga';

const sagaMiddleware = createSagaMiddleware();
const middleware = [sagaMiddleware];
const store = compose(applyMiddleware(...middleware))(createStore)(reducers);
export const store = compose(applyMiddleware(...middleware))(createStore)(reducers);
sagaMiddleware.run(rootSaga);

const App = () => {
Expand Down
5 changes: 5 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ dependencies {
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
implementation ("androidx.appcompat:appcompat:1.3.1") {
version {
strictly '1.3.1'
}
}

debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
Expand Down
Binary file added assets/close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/github_logo.png.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/linkedIn_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/twitter_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "eslint . --fix --ext .js,.jsx,.ts,.tsx",
"format-check": "prettier --check ./src",
"format-fix": "prettier --write ./src",
"precommit-check": "yarn run format-fix && yarn run lint && yarn run test",
"precommit-check": "yarn run format-fix && yarn run lint",
"build": "npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res; cd android ; ./gradlew assembleDebug"
},
"dependencies": {
Expand All @@ -32,6 +32,7 @@
"react-native-datepicker": "^1.7.2",
"react-native-device-info": "^10.8.0",
"react-native-element-dropdown": "^2.0.0",
"react-native-encrypted-storage": "^4.0.3",
"react-native-floating-action": "^1.22.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-image-picker": "^4.7.1",
Expand Down
28 changes: 28 additions & 0 deletions src/components/ErrorScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';
import { Modal, StyleSheet, View, Text } from 'react-native';

const ErrorScreen = ({ error }: string) => {
return (
<Modal transparent={true}>
<View style={styles.container}>
<Text>{error}</Text>
</View>
</Modal>
);
};

export default ErrorScreen;

const styles = StyleSheet.create({
container: {
justifyContent: 'center',
alignItems: 'center',
flex: 1,
top: 0,
bottom: 0,
left: 0,
right: 0,
position: 'absolute',
zIndex: 1,
},
});
12 changes: 9 additions & 3 deletions src/components/LoadingScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import { ActivityIndicator, StyleSheet, View } from 'react-native';
import { ActivityIndicator, Modal, StyleSheet, View } from 'react-native';

function LoadingScreen() {
return (
<>
<Modal transparent={true}>
<View style={styles.container}>
<ActivityIndicator size="large" />
</View>
</>
</Modal>
);
}

Expand All @@ -18,5 +18,11 @@ const styles = StyleSheet.create({
justifyContent: 'center',
alignItems: 'center',
flex: 1,
top: 0,
bottom: 0,
left: 0,
right: 0,
position: 'absolute',
zIndex: 1,
},
});
135 changes: 135 additions & 0 deletions src/components/OOO/OOOForm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
import Images from '../../constants/images/Image';
import {
StyleSheet,
TextInput,
View,
Alert,
TouchableOpacity,
Text,
Pressable,
Image,
} from 'react-native';
import React from 'react';
import { OOOFormType } from './OOOFormType';
import DatePicker from './OOOFormDatePicker';

const OOOForm = ({
fromDate,
toDate,
description,
setToDate,
setFromDate,
setDescription,
handleFormSubmit,
isLoading,
setIsFormVisible,
}: OOOFormType) => {
const isFormValid = () => {
// Check if fromDate and toDate are not null or undefined
if (!fromDate || !toDate) {
Alert.alert('Error', 'Please select both From Date and To Date.');
return false;
}

// Check if fromDate is less than toDate
if (fromDate >= toDate) {
Alert.alert('Error', 'From Date must be less than To Date.');
return false;
}

// Check if description is not empty
if (!description) {
Alert.alert('Error', 'Description is required.');
return false;
}

return true;
};

return (
<View style={styles.formContainer}>
<Pressable onPress={(prev) => setIsFormVisible(!prev)}>
<Image style={styles.close} source={Images.closeIcon} />
</Pressable>
<DatePicker
title={`From date: ${fromDate.toLocaleString('en-US')}`}
onDateChange={(date) => setFromDate(date)}
selectedDate={fromDate}
/>
<DatePicker
title={`To date: ${toDate.toLocaleString('en-US')}`}
onDateChange={(date) => setToDate(date)}
selectedDate={toDate}
/>
<TextInput
style={[styles.input, styles.textArea, styles.text]}
value={description}
onChangeText={setDescription}
multiline
numberOfLines={4}
/>
<TouchableOpacity
onPress={() => {
isFormValid() && handleFormSubmit();
}}
style={styles.SubmitButtonContainer}
disabled={isLoading}
>
<Text style={styles.SubmitButtonText}>Submit</Text>
</TouchableOpacity>
</View>
);
};

export default OOOForm;

const styles = StyleSheet.create({
container: {
padding: 20,
},
formContainer: {
backgroundColor: '#f9f9f9',
paddingHorizontal: 35,
paddingVertical: 20,
borderRadius: 8,
marginTop: -30,
marginLeft: 30,
marginRight: 30,
},
input: {
height: 40,
borderColor: '#ccc',
borderWidth: 1,
borderRadius: 4,
marginBottom: 10,
marginTop: 20,
paddingHorizontal: 10,
},
textArea: {
height: 80,
},
close: {
height: 20,
width: 20,
marginLeft: 'auto',
marginBottom: 10,
},
text: {
color: '#000000',
},
SubmitButtonContainer: {
backgroundColor: '#808080',
paddingVertical: 10,
paddingHorizontal: 12,
width: '30%',
borderRadius: 10,
marginLeft: 'auto',
marginRight: 'auto',
},
SubmitButtonText: {
color: '#fff',
alignSelf: 'center',
borderWidth: 1,
borderColor: '#808080',
},
});
65 changes: 65 additions & 0 deletions src/components/OOO/OOOFormDatePicker.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import React, { useState } from 'react';
import { Text, TouchableOpacity, StyleSheet, ScrollView } from 'react-native';
import DatePicker from 'react-native-date-picker';

type DatePickerProps = {
title: string;
onDateChange: (date: Date) => void;
selectedDate: Date;
};

const DeadLineDatePicker = (props: DatePickerProps) => {
const [open, setOpen] = useState(false);
const { onDateChange, selectedDate, title } = props;
return (
<ScrollView>
<TouchableOpacity
style={styles.buttonStyle}
onPress={() => {
setOpen(true);
}}
>
<Text style={styles.buttonTextStyle}>{title}</Text>
</TouchableOpacity>
<DatePicker
modal
mode="date"
open={open}
date={selectedDate || new Date()}
onConfirm={(date) => {
setOpen(false);
console.log('date', date);
onDateChange(date);
}}
onCancel={() => {
setOpen(false);
}}
/>
</ScrollView>
);
};

const styles = StyleSheet.create({
buttonStyle: {
width: '100%',
height: 50,
elevation: 5,
borderRadius: 10,
borderWidth: 1,
backgroundColor: 'white',
alignSelf: 'center',
marginTop: 10,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
paddingLeft: 15,
paddingRight: 15,
},
buttonTextStyle: {
fontWeight: '600',
color: 'black',
justifyContent: 'center',
},
});

export default DeadLineDatePicker;
11 changes: 11 additions & 0 deletions src/components/OOO/OOOFormType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export type OOOFormType = {
toDate: Date;
fromDate: Date;
description: string;
setToDate: () => void;
setFromDate: () => void;
setDescription: () => void;
handleFormSubmit: () => void;
isLoading: boolean;
setIsFormVisible: () => void;
};
1 change: 1 addition & 0 deletions src/components/ToDoComponent/Styles/TodoStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const TodoStyles = StyleSheet.create({
fontSize: 20,
alignSelf: 'center',
position: 'relative',
color: '#000000',
top: 10,
},
flex: {
Expand Down
11 changes: 10 additions & 1 deletion src/components/ToDoComponent/TodoComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ const TodoComponent = () => {
style={styles.CreateGoalButton}
onPress={() => navigation.navigate('CreatingGoals')}
>
<Text style={{ color: 'black', elevation: 10 }}> Add</Text>
<Text
style={{
color: 'black',
elevation: 10,
paddingHorizontal: 6,
paddingVertical: 6,
}}
>
Add
</Text>
</TouchableOpacity>
</View>
<View style={{ paddingVertical: 35 }}>
Expand Down
5 changes: 5 additions & 0 deletions src/constants/apiConstant/HomeApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const HomeApi = {
GET_USER_STATUS: 'https://api.realdevsquad.com/users/status/self',
UPDATE_STATUS:
'https://api.realdevsquad.com/users/status/self?userStatusFlag=true',
};
3 changes: 3 additions & 0 deletions src/constants/images/Image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const Images = {
//AuthScreen Icon
refreshIcon: require('../../../assets/refresh_icon.png'),

//OOO Form Icons
closeIcon: require('../../../assets/close.png'),

// camera gallery options

cameraIcon: require('../../../assets/camera.png'),
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const Strings = {
OUT_OF_OFFICE: 'ooo',
ACTIVE: 'active',
IDLE: 'idle',

UPDATE_STATUS_TO_OOO: 'Change your status to OOO',
CANCEL_OOO: 'Cancel OOO',
};

export default Strings;
Loading