Commit 022b8486 authored by dungtnguyen's avatar dungtnguyen

fix reanimated

parent 6a1f679e
...@@ -13,10 +13,9 @@ import {LocaleConfig} from 'react-native-calendars'; ...@@ -13,10 +13,9 @@ import {LocaleConfig} from 'react-native-calendars';
import Toast from 'react-native-toast-message'; import Toast from 'react-native-toast-message';
import {Colors} from 'react-native/Libraries/NewAppScreen'; import {Colors} from 'react-native/Libraries/NewAppScreen';
import {Provider} from 'react-redux'; import {Provider} from 'react-redux';
import store from './src/app/store';
import NoConnection from './src/components/noconnection/NoConnection'; import NoConnection from './src/components/noconnection/NoConnection';
import Main from './src/Main'; import Main from './src/Main';
import store from './src/app/store';
function App(): React.JSX.Element { function App(): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark'; const isDarkMode = useColorScheme() === 'dark';
...@@ -70,10 +69,12 @@ function App(): React.JSX.Element { ...@@ -70,10 +69,12 @@ function App(): React.JSX.Element {
setConnetionStatus(false); setConnetionStatus(false);
} }
}); });
return () => { return () => {
unsubscribe(); unsubscribe();
}; };
}, []); }, []);
return ( return (
<Provider store={store}> <Provider store={store}>
<SafeAreaView style={backgroundStyle}> <SafeAreaView style={backgroundStyle}>
......
Upgrage version and refactor anawork mobile Upgrage version and refactor anawork mobile
Link project by npm i .tgz
add package if have error then npm start --reset-cache
\ No newline at end of file
...@@ -105,6 +105,14 @@ android { ...@@ -105,6 +105,14 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
} }
} }
splits {
abi {
reset()
enable true
universalApk false
include "arm64-v8a", "x86", "x86_64" // Bỏ "armeabi-v7a"
}
}
} }
dependencies { dependencies {
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- Include only if your app benefits from precise location access. -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<application <application
android:name=".MainApplication" android:name=".MainApplication"
android:label="@string/app_name" android:label="@string/app_name"
......
{"app_secret": "9998d04a-f9a4-4429-af16-179a1987245e"}
...@@ -10,7 +10,6 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load ...@@ -10,7 +10,6 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.soloader.SoLoader import com.facebook.soloader.SoLoader
class MainApplication : Application(), ReactApplication { class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost = override val reactNativeHost: ReactNativeHost =
...@@ -20,7 +19,6 @@ class MainApplication : Application(), ReactApplication { ...@@ -20,7 +19,6 @@ class MainApplication : Application(), ReactApplication {
// Packages that cannot be autolinked yet can be added manually here, for example: // Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage()) // add(MyReactNativePackage())
} }
override fun getJSMainModuleName(): String = "index" override fun getJSMainModuleName(): String = "index"
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
......
<resources> <resources>
<string name="app_name">anawork_mobile</string> <string name="app_name">Anawork</string>
<string moduleConfig="true" name="CodePushDeploymentKey">JAsWjnJ4J8vppvL1z9TzN9OZ-cXGjLv98E9sx5</string>
<string name="appCenterCrashes_whenToSendCrashes" moduleConfig="true" translatable="false">
DO_NOT_ASK_JAVASCRIPT</string>
<string name="appCenterAnalytics_whenToEnableAnalytics" moduleConfig="true" translatable="false">
ALWAYS_SEND</string>
</resources> </resources>
\ No newline at end of file
...@@ -4,7 +4,7 @@ buildscript { ...@@ -4,7 +4,7 @@ buildscript {
minSdkVersion = 23 minSdkVersion = 23
compileSdkVersion = 34 compileSdkVersion = 34
targetSdkVersion = 34 targetSdkVersion = 34
ndkVersion = "26.1.10909125" ndkVersion = "25.1.8937393"
kotlinVersion = "1.9.24" kotlinVersion = "1.9.24"
} }
repositories { repositories {
......
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
const storageKey = { const storageKey = {
AUTH: 'auth', AUTH: 'AUTH',
LANGUAGE: 'language', LANGUAGE: 'language',
}; };
const profileField = { const profileField = {
......
...@@ -30,11 +30,11 @@ import { ...@@ -30,11 +30,11 @@ import {
} from './homeSlice'; } from './homeSlice';
import styles from './style'; import styles from './style';
import HomeMainView from './template/HomeMainView'; import HomeMainView from './template/HomeMainView';
const HomeContainer = props => { const HomeContainer = props => {
const {userInfo, quotationList, birthdayListInMonth, randomQuotation} = props; const {userInfo, quotationList, birthdayListInMonth, randomQuotation} = props;
const dispatch = useDispatch(); const dispatch = useDispatch();
const [RemoteComponent, setRemoteComponent] = useState(null);
const [loading, setLoading] = useState(false);
const [arrPersonnel, setArrPersonnel] = useState([]); const [arrPersonnel, setArrPersonnel] = useState([]);
const [showModalInstall, setShowModalInstall] = useState(false); const [showModalInstall, setShowModalInstall] = useState(false);
//console.log('userDetails', userDetails); //console.log('userDetails', userDetails);
...@@ -395,6 +395,9 @@ const HomeContainer = props => { ...@@ -395,6 +395,9 @@ const HomeContainer = props => {
fetchDirectManagers(); fetchDirectManagers();
}; };
const downloadComponent = async () => {
setLoading(true);
};
// useEffect // useEffect
useEffect(() => { useEffect(() => {
const backAction = () => { const backAction = () => {
...@@ -422,6 +425,9 @@ const HomeContainer = props => { ...@@ -422,6 +425,9 @@ const HomeContainer = props => {
birthdayListInMonth && formatDateList(); birthdayListInMonth && formatDateList();
}, [birthdayListInMonth]); }, [birthdayListInMonth]);
useEffect(() => {
RemoteComponent && console.log('RemoteComponent', RemoteComponent);
}, [RemoteComponent]);
//props //props
const homeProps = { const homeProps = {
userInfo, userInfo,
...@@ -437,6 +443,7 @@ const HomeContainer = props => { ...@@ -437,6 +443,7 @@ const HomeContainer = props => {
openProfileComponent, openProfileComponent,
randomQuotation, randomQuotation,
showModalInstall, showModalInstall,
downloadComponent,
setShowModalInstall, setShowModalInstall,
OpenProfileUserComponent, OpenProfileUserComponent,
setWishTxt, setWishTxt,
......
...@@ -14,86 +14,111 @@ import colors from '../../../values/colors'; ...@@ -14,86 +14,111 @@ import colors from '../../../values/colors';
import {IMAGES} from '../../../assets/images'; import {IMAGES} from '../../../assets/images';
import {ArrowLeftSVG} from '../../../assets/svg'; import {ArrowLeftSVG} from '../../../assets/svg';
import {Button} from 'react-native-paper'; import {Button} from 'react-native-paper';
import ImCheckInModule from 'ImCheckInModule';
const windowWidth = Dimensions.get('window').width; const windowWidth = Dimensions.get('window').width;
const ImCheckInInstall = props => { const ImCheckInInstall = props => {
const {showModalInstall, toggleImCheckInModal} = props; const {showModalInstall, toggleImCheckInModal, downloadComponent} = props;
//console.log('userDetails', userDetails); //console.log('userDetails', userDetails);
return ( return (
// <Modal
// style={commonStyles.baseShadow}
// animationType="slide"
// transparent={true}
// visible={showModalInstall}>
// <View style={[commonStyles.container, {backgroundColor: colors.white}]}>
// <ScrollView>
// <View style={styles.contentContainer}>
// <View style={[commonStyles.row, {marginBottom: 10}]}>
// <TouchableOpacity onPress={toggleImCheckInModal}>
// <ArrowLeftSVG width={30} height={30} />
// </TouchableOpacity>
// </View>
// <View style={commonStyles.row}>
// <Image
// source={IMAGES.ImCheckInLogo}
// style={{borderRadius: 8, width: 80, height: 80}}
// />
// <View style={{marginLeft: 10}}>
// <AppText size={25} isTitle>
// ImCheckIn
// </AppText>
// <AppText color={colors.primary_blue}>MeU-Solutions</AppText>
// <AppText isSubText>Ứng dụng checkin</AppText>
// </View>
// </View>
// </View>
// <View>
// <Button
// style={{
// backgroundColor: colors.royal_blue,
// borderRadius: 5,
// margin: 10,
// }}
// mode="contained"
// onPress={() => downloadComponent()}>
// Cài đặt
// </Button>
// </View>
// <View style={{margin: 10}}>
// <AppText>
// Phần mềm chấm công ImCheckin cung cấp một giao diện người dùng
// trực quan và dễ sử dụng, giúp cả nhân viên và quản lý có thể dễ
// dàng theo dõi tình trạng chấm công. Giao diện này được thiết kế
// với mục đích tối ưu hóa trải nghiệm người dùng, bao gồm:
// </AppText>
// <AppText>
// {`\u2022 Bảng điều khiển tổng quan: Cung cấp một cái nhìn nhanh chóng về tình trạng chấm công của toàn bộ nhân viên. Bảng điều khiển này giúp quản lý nắm bắt nhanh chóng tình hình chấm công của công ty mà không cần phải đi sâu vào chi tiết, cụ thể:`}
// </AppText>
// <View style={{margin: 10}}>
// <AppText>{`\u2022 Số lượng nhân viên đã check-in/check-out.`}</AppText>
// <AppText>{`\u2022 Thống kê về thời gian làm việc.`}</AppText>
// <AppText>{`\u2022 Báo cáo về các trường hợp đi muộn hoặc về sớm.`}</AppText>
// </View>
// </View>
// <View style={{margin: 10}}>
// <AppText>
// Hiển thị thông tin cá nhân: Đối với mỗi nhân viên, ImCheckin hiển
// thị thông tin chấm công cá nhân một cách rõ ràng và chi tiết:
// </AppText>
// <AppText>{`\u2022 Lịch sử chấm công theo ngày/tuần/tháng.`}</AppText>
// <AppText>{`\u2022 Thời gian làm việc thực tế so với thời gian quy định.`}</AppText>
// <AppText>{`\u2022 Số giờ làm thêm (nếu có).`}</AppText>
// <AppText>{`\u2022 ...`}</AppText>
// </View>
// <View style={{margin: 10}}>
// <AppText>
// Thông báo và cảnh báo: Hệ thống cũng cung cấp các thông báo và
// cảnh báo kịp thời như:
// </AppText>
// <AppText>{`\u2022 Nhắc nhở chấm công khi nhân viên quên check-in/check-out.`}</AppText>
// <AppText>{`\u2022 Cảnh báo về các trường hợp đi muộn hoặc về sớm thường xuyên.`}</AppText>
// <AppText>{`\u2022 Thông báo về các yêu cầu nghỉ phép hoặc làm thêm giờ.`}</AppText>
// </View>
// </ScrollView>
// </View>
// </Modal>
<Modal <Modal
style={commonStyles.baseShadow} style={commonStyles.baseShadow}
animationType="slide" animationType="slide"
transparent={true} transparent={true}
visible={showModalInstall}> visible={showModalInstall}>
<View style={[commonStyles.container, {backgroundColor: colors.white}]}> <View style={[commonStyles.container, {backgroundColor: colors.white}]}>
<ScrollView> <View
<View style={styles.contentContainer}> style={[
<View style={[commonStyles.row, {marginBottom: 10}]}> {
position: 'absolute',
top: 10,
left: 10,
backgroundColor: 'red',
},
]}>
<TouchableOpacity onPress={toggleImCheckInModal}> <TouchableOpacity onPress={toggleImCheckInModal}>
<ArrowLeftSVG width={30} height={30} /> <ArrowLeftSVG width={30} height={30} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={commonStyles.row}> <View style={{flex: 1}}>
<Image <ImCheckInModule />
source={IMAGES.ImCheckInLogo}
style={{borderRadius: 8, width: 80, height: 80}}
/>
<View style={{marginLeft: 10}}>
<AppText size={25} isTitle>
ImCheckIn
</AppText>
<AppText color={colors.primary_blue}>MeU-Solutions</AppText>
<AppText isSubText>ng dng checkin</AppText>
</View>
</View>
</View>
<View>
<Button
style={{
backgroundColor: colors.royal_blue,
borderRadius: 5,
margin: 10,
}}
mode="contained"
onPress={() => console.log('Pressed')}>
Cài đặt
</Button>
</View>
<View style={{margin: 10}}>
<AppText>
Phn mm chm công ImCheckin cung cp mt giao din người dùng
trc quan và d s dng, giúp c nhân viên và qun lý có th d
dàng theo dõi tình trng chm công. Giao din này được thiết kế
vi mc đích ti ưu hóa tri nghim người dùng, bao gm:
</AppText>
<AppText>
{`\u2022 Bảng điều khiển tổng quan: Cung cấp một cái nhìn nhanh chóng về tình trạng chấm công của toàn bộ nhân viên. Bảng điều khiển này giúp quản lý nắm bắt nhanh chóng tình hình chấm công của công ty mà không cần phải đi sâu vào chi tiết, cụ thể:`}
</AppText>
<View style={{margin: 10}}>
<AppText>{`\u2022 Số lượng nhân viên đã check-in/check-out.`}</AppText>
<AppText>{`\u2022 Thống kê về thời gian làm việc.`}</AppText>
<AppText>{`\u2022 Báo cáo về các trường hợp đi muộn hoặc về sớm.`}</AppText>
</View>
</View>
<View style={{margin: 10}}>
<AppText>
Hin th thông tin cá nhân: Đối vi mi nhân viên, ImCheckin hin
th thông tin chm công cá nhân mt cách rõ ràng và chi tiết:
</AppText>
<AppText>{`\u2022 Lịch sử chấm công theo ngày/tuần/tháng.`}</AppText>
<AppText>{`\u2022 Thời gian làm việc thực tế so với thời gian quy định.`}</AppText>
<AppText>{`\u2022 Số giờ làm thêm (nếu có).`}</AppText>
<AppText>{`\u2022 ...`}</AppText>
</View>
<View style={{margin: 10}}>
<AppText>
Thông báo và cnh báo: H thng cũng cung cp các thông báo và
cnh báo kp thi như:
</AppText>
<AppText>{`\u2022 Nhắc nhở chấm công khi nhân viên quên check-in/check-out.`}</AppText>
<AppText>{`\u2022 Cảnh báo về các trường hợp đi muộn hoặc về sớm thường xuyên.`}</AppText>
<AppText>{`\u2022 Thông báo về các yêu cầu nghỉ phép hoặc làm thêm giờ.`}</AppText>
</View> </View>
</ScrollView>
</View> </View>
</Modal> </Modal>
); );
......
...@@ -22,7 +22,8 @@ export default function homePropsProvider(props) { ...@@ -22,7 +22,8 @@ export default function homePropsProvider(props) {
randomQuotation, randomQuotation,
showModalInstall, showModalInstall,
setShowModalInstall, setShowModalInstall,
toggleImCheckInModal toggleImCheckInModal,
downloadComponent,
} = props; } = props;
return { return {
userInfo, userInfo,
...@@ -54,7 +55,8 @@ export default function homePropsProvider(props) { ...@@ -54,7 +55,8 @@ export default function homePropsProvider(props) {
imCheckInInstall: { imCheckInInstall: {
showModalInstall, showModalInstall,
setShowModalInstall, setShowModalInstall,
toggleImCheckInModal toggleImCheckInModal,
downloadComponent,
}, },
}; };
} }
...@@ -15,6 +15,7 @@ import Quotation from './subViews/QuotationList'; ...@@ -15,6 +15,7 @@ import Quotation from './subViews/QuotationList';
import {Button} from 'react-native-paper'; import {Button} from 'react-native-paper';
import {IMAGES} from '../../../assets/images'; import {IMAGES} from '../../../assets/images';
import ImCheckInInstall from '../components/ImCheckInInstall'; import ImCheckInInstall from '../components/ImCheckInInstall';
import ImCheckInModule from 'ImCheckInModule';
const HomeMainView = ({ const HomeMainView = ({
userInfo, userInfo,
openView, openView,
...@@ -60,8 +61,12 @@ const HomeMainView = ({ ...@@ -60,8 +61,12 @@ const HomeMainView = ({
)} )}
<BirthdayModal {...birthdayModalProps} /> <BirthdayModal {...birthdayModalProps} />
<ImCheckInInstall {...imCheckInInstall} /> <ImCheckInInstall {...imCheckInInstall} />
{openProfileComponent && openProfileComponent} {openProfileComponent && openProfileComponent}
</SafeAreaView> </SafeAreaView>
// <SafeAreaView style={styles.container}>
// <ImCheckInModule />
// </SafeAreaView>
); );
}; };
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment