Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
anawork-mobile-v2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dungtnguyen
anawork-mobile-v2
Commits
32fb9014
Commit
32fb9014
authored
Oct 08, 2024
by
quynhquang400@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add base shadow
parent
42a00560
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
289 additions
and
228 deletions
+289
-228
ConfirmDateContainer.js
src/screens/confirm_date/ConfirmDateContainer.js
+4
-3
confirmDatePropsProvider.js
src/screens/confirm_date/confirmDatePropsProvider.js
+50
-0
style.js
src/screens/confirm_date/style.js
+9
-1
ConfirmMainView.js
src/screens/confirm_date/template/ConfirmMainView.js
+10
-25
StatisticsConfirmWorkdays.js
...irm_date/template/components/StatisticsConfirmWorkdays.js
+176
-183
confirmDateProviderProps.js
...screens/confirm_date/template/confirmDateProviderProps.js
+0
-0
style.js
src/screens/home/style.js
+5
-7
CalendarBirthday.js
src/screens/home/template/subViews/CalendarBirthday.js
+2
-1
QuotationList.js
src/screens/home/template/subViews/QuotationList.js
+3
-3
OnLeaveMainView.js
src/screens/onleave/template/OnLeaveMainView.js
+8
-5
commonStyles.js
src/styles/commonStyles.js
+21
-0
colors.js
src/values/colors.js
+1
-0
No files found.
src/screens/confirm_date/ConfirmDateContainer.js
View file @
32fb9014
...
@@ -8,6 +8,7 @@ import ConfirmModalAddNew from './confirm-modals/ConfirmModalAddNew';
...
@@ -8,6 +8,7 @@ import ConfirmModalAddNew from './confirm-modals/ConfirmModalAddNew';
import
ConfirmModalDetails
from
'./confirm-modals/ConfirmModalDetails'
;
import
ConfirmModalDetails
from
'./confirm-modals/ConfirmModalDetails'
;
import
{
getConfirmApprovedDate
,
getUserConfirmDay
}
from
'./confirmDateSlice'
;
import
{
getConfirmApprovedDate
,
getUserConfirmDay
}
from
'./confirmDateSlice'
;
import
ConfirmDateMainView
from
'./template/ConfirmMainView'
;
import
ConfirmDateMainView
from
'./template/ConfirmMainView'
;
import
confirmDatePropsProvider
from
'./confirmDatePropsProvider'
;
const
ConfirmDateContainer
=
props
=>
{
const
ConfirmDateContainer
=
props
=>
{
const
{
confirmDateList
,
confirmApprovedDateList
,
userInfo
}
=
props
;
const
{
confirmDateList
,
confirmApprovedDateList
,
userInfo
}
=
props
;
const
dispatch
=
useDispatch
();
const
dispatch
=
useDispatch
();
...
@@ -93,7 +94,7 @@ const ConfirmDateContainer = props => {
...
@@ -93,7 +94,7 @@ const ConfirmDateContainer = props => {
});
});
};
};
const
loadDataRequestApprove
=
async
()
=>
{
const
fetchAbsentApprovalRequests
=
async
()
=>
{
const
res
=
await
dispatch
(
const
res
=
await
dispatch
(
getConfirmApprovedDate
({
getConfirmApprovedDate
({
filter
:
approveReqPayload
.
filter
,
filter
:
approveReqPayload
.
filter
,
...
@@ -362,7 +363,7 @@ const ConfirmDateContainer = props => {
...
@@ -362,7 +363,7 @@ const ConfirmDateContainer = props => {
},
[
confirmApprovedDateList
]);
},
[
confirmApprovedDateList
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
approveReqPayload
&&
loadDataRequestApprove
();
approveReqPayload
&&
fetchAbsentApprovalRequests
();
},
[
approveReqPayload
]);
},
[
approveReqPayload
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
userConfirmPayload
&&
loadDataConfirmDay
();
userConfirmPayload
&&
loadDataConfirmDay
();
...
@@ -395,7 +396,7 @@ const ConfirmDateContainer = props => {
...
@@ -395,7 +396,7 @@ const ConfirmDateContainer = props => {
onChangeMonthFilter
,
onChangeMonthFilter
,
minutesToHours
,
minutesToHours
,
};
};
return
<
ConfirmDateMainView
{...
confirm
Props
}
/>
;
return
<
ConfirmDateMainView
{...
confirm
DatePropsProvider
(
confirmProps
)
}
/>
;
};
};
export
default
ConfirmDateContainer
;
export
default
ConfirmDateContainer
;
src/screens/confirm_date/confirmDatePropsProvider.js
0 → 100644
View file @
32fb9014
export
default
function
confirmDatePropsProvider
(
props
)
{
const
{
userInfo
,
showAlert
,
requestApproveArr
,
confirmList
,
isDisableLoadMore
,
dataChart
,
modalContent
,
approveReqPayload
,
dayPress
,
onChangeDayPressInChart
,
onOpenDetailModal
,
onOpenAddModal
,
onLoadMoreConfirmList
,
onHideAlert
,
navigateToDayWage
,
alertMessage
,
onLoadMoreRequestApprove
,
onRefreshApproveList
,
onRefreshConfirmList
,
onChangeSelectFilter
,
onChangeMonthFilter
,
minutesToHours
,
}
=
props
;
return
{
userInfo
,
showAlert
,
requestApproveArr
,
confirmList
,
isDisableLoadMore
,
dataChart
,
modalContent
,
approveReqPayload
,
dayPress
,
onChangeDayPressInChart
,
onOpenDetailModal
,
onOpenAddModal
,
onLoadMoreConfirmList
,
onHideAlert
,
navigateToDayWage
,
alertMessage
,
onLoadMoreRequestApprove
,
onRefreshApproveList
,
onRefreshConfirmList
,
onChangeSelectFilter
,
onChangeMonthFilter
,
minutesToHours
,
};
}
src/screens/confirm_date/style.js
View file @
32fb9014
...
@@ -396,5 +396,13 @@ const styles = StyleSheet.create({
...
@@ -396,5 +396,13 @@ const styles = StyleSheet.create({
paddingTop
:
15
,
paddingTop
:
15
,
},
},
});
});
export
const
statisticsConfirmWorkdaysStyles
=
StyleSheet
.
create
({
container
:
{
padding
:
15
,
backgroundColor
:
'white'
,
height
:
380
,
margin
:
10
,
borderRadius
:
5
,
},
});
export
default
styles
;
export
default
styles
;
src/screens/confirm_date/template/ConfirmMainView.js
View file @
32fb9014
...
@@ -16,20 +16,17 @@ import FastImage from 'react-native-fast-image';
...
@@ -16,20 +16,17 @@ import FastImage from 'react-native-fast-image';
import
SelectDropdown
from
'react-native-select-dropdown'
;
import
SelectDropdown
from
'react-native-select-dropdown'
;
import
AppText
from
'../../../components/AppText'
;
import
AppText
from
'../../../components/AppText'
;
import
StatisticsConfirmWorkdays
from
'./components/StatisticsConfirmWorkdays'
;
import
StatisticsConfirmWorkdays
from
'./components/StatisticsConfirmWorkdays'
;
import
commonStyles
from
'../../../styles/commonStyles'
;
const
ConfirmDateMainView
=
({
const
ConfirmDateMainView
=
({
dataChart
,
isDisableLoadMore
,
isDisableLoadMore
,
userDetails
,
showAlert
,
showAlert
,
onHideAlert
,
onHideAlert
,
navigateToDayWage
,
navigateToDayWage
,
alertMessage
,
onLoadMoreRequestApprove
,
onLoadMoreRequestApprove
,
onLoadMoreConfirmList
,
onLoadMoreConfirmList
,
requestApproveArr
,
requestApproveArr
,
confirmList
,
confirmList
,
monthChart
,
onRefreshConfirmList
,
onRefreshConfirmList
,
modalContent
,
modalContent
,
onOpenDetailModal
,
onOpenDetailModal
,
...
@@ -37,31 +34,19 @@ const ConfirmDateMainView = ({
...
@@ -37,31 +34,19 @@ const ConfirmDateMainView = ({
approveReqPayload
,
approveReqPayload
,
onChangeSelectFilter
,
onChangeSelectFilter
,
minutesToHours
,
minutesToHours
,
dataChart
,
onChangeMonthFilter
,
dayPress
,
})
=>
{
})
=>
{
const
typeChartColor
=
[
{
color
:
'#7d93ff'
,
name
:
'Trên 6h'
},
{
color
:
'#9eaeff'
,
name
:
'4-6h'
},
{
color
:
'#bec9ff'
,
name
:
'2-4h'
},
{
color
:
'#dfe4ff'
,
name
:
'0-2h'
},
{
color
:
'#f2f2f2'
,
name
:
'0h'
},
];
//console.log(dataChart?.data);
const
dayOfWeek
=
[
'Monday'
,
'Tuesday'
,
'Wednesday'
,
'Thursday'
,
'Friday'
,
'Saturday'
,
'Sunday'
,
];
return
(
return
(
<
SafeAreaView
>
<
SafeAreaView
>
<
ScrollView
nestedScrollEnabled
=
{
true
}
>
<
ScrollView
nestedScrollEnabled
=
{
true
}
>
<
StatisticsConfirmWorkdays
/>
<
StatisticsConfirmWorkdays
<
View
style
=
{
styles
.
view
}
>
dataChart
=
{
dataChart
}
onChangeMonthFilter
=
{
onChangeMonthFilter
}
dayPress
=
{
dayPress
}
/
>
<
View
style
=
{[
styles
.
view
,
commonStyles
.
baseShadow
]}
>
<
AppText
style
=
{{
fontWeight
:
'500'
,
marginBottom
:
10
}}
>
<
AppText
style
=
{{
fontWeight
:
'500'
,
marginBottom
:
10
}}
>
X
á
c
nh
ậ
n
ng
à
y
c
ô
ng
c
ủ
a
b
ạ
n
:{
' '
}
X
á
c
nh
ậ
n
ng
à
y
c
ô
ng
c
ủ
a
b
ạ
n
:{
' '
}
<
/AppText
>
<
/AppText
>
...
...
src/screens/confirm_date/template/components/StatisticsConfirmWorkdays.js
View file @
32fb9014
This diff is collapsed.
Click to expand it.
src/screens/confirm_date/template/confirmDateProviderProps.js
deleted
100644 → 0
View file @
42a00560
src/screens/home/style.js
View file @
32fb9014
...
@@ -5,17 +5,15 @@ const windowWidth = Dimensions.get('window').width;
...
@@ -5,17 +5,15 @@ const windowWidth = Dimensions.get('window').width;
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
container
:
{
container
:
{
flex
:
1
,
flex
:
1
,
padding
:
10
,
},
},
viewContent
:
{
viewContent
:
{
borderRadius
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderWidth
:
1
,
width
:
'100%'
,
width
:
windowWidth
-
20
,
borderColor
:
'white'
,
borderColor
:
colors
.
white
,
backgroundColor
:
'white'
,
backgroundColor
:
colors
.
white
,
alignSelf
:
'center'
,
alignSelf
:
'center'
,
marginTop
:
10
,
margin
:
10
,
marginBottom
:
10
,
},
},
bgQuote
:
{
bgQuote
:
{
width
:
windowWidth
-
10
,
width
:
windowWidth
-
10
,
...
@@ -33,7 +31,7 @@ const styles = StyleSheet.create({
...
@@ -33,7 +31,7 @@ const styles = StyleSheet.create({
textAlign
:
'right'
,
textAlign
:
'right'
,
},
},
calendarHolder
:
{
calendarHolder
:
{
margin
Bottom
:
10
,
margin
:
10
,
borderTopLeftRadius
:
15
,
borderTopLeftRadius
:
15
,
borderTopRightRadius
:
15
,
borderTopRightRadius
:
15
,
backgroundColor
:
'white'
,
backgroundColor
:
'white'
,
...
...
src/screens/home/template/subViews/CalendarBirthday.js
View file @
32fb9014
...
@@ -8,6 +8,7 @@ import AppText from '../../../../components/AppText';
...
@@ -8,6 +8,7 @@ import AppText from '../../../../components/AppText';
import
colors
from
'../../../../values/colors'
;
import
colors
from
'../../../../values/colors'
;
import
{
IMAGES
}
from
'../../../../values/images'
;
import
{
IMAGES
}
from
'../../../../values/images'
;
import
styles
from
'../../style'
;
import
styles
from
'../../style'
;
import
commonStyles
from
'../../../../styles/commonStyles'
;
const
CalendarBirthday
=
React
.
memo
(
const
CalendarBirthday
=
React
.
memo
(
({
({
birthdayOfUser
,
birthdayOfUser
,
...
@@ -17,7 +18,7 @@ const CalendarBirthday = React.memo(
...
@@ -17,7 +18,7 @@ const CalendarBirthday = React.memo(
})
=>
{
})
=>
{
const
today
=
moment
(
moment
()).
format
(
'YYYY-MM-DD'
);
// Today
const
today
=
moment
(
moment
()).
format
(
'YYYY-MM-DD'
);
// Today
return
(
return
(
<
View
style
=
{
styles
.
viewContent
}
>
<
View
style
=
{
[
styles
.
viewContent
,
commonStyles
.
baseShadow
]
}
>
<
Image
source
=
{
IMAGES
.
BgBirthdayHeader
}
style
=
{
styles
.
BgBirthday
}
/
>
<
Image
source
=
{
IMAGES
.
BgBirthdayHeader
}
style
=
{
styles
.
BgBirthday
}
/
>
{
birthdayOfUser
&&
(
{
birthdayOfUser
&&
(
<
Swiper
<
Swiper
...
...
src/screens/home/template/subViews/QuotationList.js
View file @
32fb9014
/* eslint-disable prettier/prettier */
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Dimensions
,
Image
,
StyleSheet
,
View
}
from
'react-native'
;
import
{
Dimensions
,
Image
,
StyleSheet
,
View
}
from
'react-native'
;
import
AppText
from
'../../../../components/AppText'
;
import
AppText
from
'../../../../components/AppText'
;
import
{
IMAGES
}
from
'../../../../values/images'
;
import
{
IMAGES
}
from
'../../../../values/images'
;
import
commonStyles
from
'../../../../styles/commonStyles'
;
const
windowWidth
=
Dimensions
.
get
(
'window'
).
width
;
const
windowWidth
=
Dimensions
.
get
(
'window'
).
width
;
const
Quotation
=
({
quotation
})
=>
{
const
Quotation
=
({
quotation
})
=>
{
return
(
return
(
<
View
style
=
{
styles
.
quotationContainer
}
>
<
View
style
=
{
[
styles
.
quotationContainer
,
commonStyles
.
baseShadow
]
}
>
<
View
style
=
{
styles
.
quotationContent
}
>
<
View
style
=
{
styles
.
quotationContent
}
>
<
AppText
style
=
{
styles
.
textQuote
}
>
<
AppText
style
=
{
styles
.
textQuote
}
>
{
quotation
?.
content
{
quotation
?.
content
...
@@ -26,9 +26,9 @@ const styles = StyleSheet.create({
...
@@ -26,9 +26,9 @@ const styles = StyleSheet.create({
borderWidth
:
1
,
borderWidth
:
1
,
borderColor
:
'white'
,
borderColor
:
'white'
,
backgroundColor
:
'white'
,
backgroundColor
:
'white'
,
marginTop
:
10
,
paddingTop
:
30
,
paddingTop
:
30
,
borderRadius
:
5
,
borderRadius
:
5
,
margin
:
10
,
},
},
quotationContent
:
{
quotationContent
:
{
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
...
src/screens/onleave/template/OnLeaveMainView.js
View file @
32fb9014
...
@@ -16,6 +16,7 @@ import config from '../../../config';
...
@@ -16,6 +16,7 @@ import config from '../../../config';
import
{
GifType
,
IMAGES
}
from
'../../../values/images'
;
import
{
GifType
,
IMAGES
}
from
'../../../values/images'
;
import
styles
from
'../style'
;
import
styles
from
'../style'
;
import
RequestLeavesDays
from
'./subViews/RequestLeavesDays'
;
import
RequestLeavesDays
from
'./subViews/RequestLeavesDays'
;
import
commonStyles
from
'../../../styles/commonStyles'
;
const
sliceColorRight
=
[
'#6dc9ee'
,
'#d9f4ff'
];
const
sliceColorRight
=
[
'#6dc9ee'
,
'#d9f4ff'
];
const
selectDataDropDown
=
[
const
selectDataDropDown
=
[
...
@@ -35,7 +36,9 @@ const DataChartLeavesRestDays = React.memo(
...
@@ -35,7 +36,9 @@ const DataChartLeavesRestDays = React.memo(
dataChart
?.
length
&&
dataChart
?.
length
&&
dataChart
.
map
((
item
,
index
)
=>
{
dataChart
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
View
key
=
{
index
}
style
=
{
styles
.
pieChartView
}
>
<
View
key
=
{
index
}
style
=
{[
styles
.
pieChartView
,
commonStyles
.
baseShadow
]}
>
<
View
style
=
{
styles
.
pieItem
}
>
<
View
style
=
{
styles
.
pieItem
}
>
<
View
style
=
{{
marginBottom
:
10
}}
>
<
View
style
=
{{
marginBottom
:
10
}}
>
<
AppText
style
=
{{
textAlign
:
'center'
,
fontSize
:
12
}}
>
<
AppText
style
=
{{
textAlign
:
'center'
,
fontSize
:
12
}}
>
...
@@ -100,9 +103,9 @@ const AddNewLeavesSection = React.memo(props => {
...
@@ -100,9 +103,9 @@ const AddNewLeavesSection = React.memo(props => {
const
{
onOpenRequestLeavesModal
,
navigateToConfirmDate
,
navigateToOverTime
}
=
const
{
onOpenRequestLeavesModal
,
navigateToConfirmDate
,
navigateToOverTime
}
=
props
;
props
;
return
(
return
(
<
View
style
=
{
styles
.
view
}
>
<
View
style
=
{
[
styles
.
view
,
commonStyles
.
baseShadow
]
}
>
<
AppText
style
=
{{
fontWeight
:
'500'
,
marginBottom
:
10
}}
>
<
AppText
style
=
{{
fontWeight
:
'500'
,
marginBottom
:
10
}}
>
Ngh
ỉ
ph
é
p
c
ủ
a
b
ạ
n
:
{
' '
}
Ngh
ỉ
ph
é
p
c
ủ
a
b
ạ
n
:
<
/AppText
>
<
/AppText
>
<
View
style
=
{{
alignItems
:
'center'
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
alignItems
:
'center'
,
justifyContent
:
'center'
}}
>
<
TouchableOpacity
<
TouchableOpacity
...
@@ -139,7 +142,7 @@ const ApproveRequestLeavesDays = React.memo(
...
@@ -139,7 +142,7 @@ const ApproveRequestLeavesDays = React.memo(
onOpenDetailModal
,
onOpenDetailModal
,
}
=
props
;
}
=
props
;
return
(
return
(
<
View
style
=
{
styles
.
view
}
>
<
View
style
=
{
[
styles
.
view
,
commonStyles
.
baseShadow
]
}
>
<
View
style
=
{
styles
.
approveRequestFilter
}
>
<
View
style
=
{
styles
.
approveRequestFilter
}
>
<
AppText
style
=
{
styles
.
approveRequestTitle
}
>
<
AppText
style
=
{
styles
.
approveRequestTitle
}
>
Duy
ệ
t
y
ê
u
c
ầ
u
ngh
ỉ
ph
é
p
Duy
ệ
t
y
ê
u
c
ầ
u
ngh
ỉ
ph
é
p
...
@@ -226,7 +229,7 @@ const LeavesRequest = React.memo(
...
@@ -226,7 +229,7 @@ const LeavesRequest = React.memo(
props => {
props => {
const {leaveRequestList, onRefreshLeaveList, onOpenDetailModal} = props;
const {leaveRequestList, onRefreshLeaveList, onOpenDetailModal} = props;
return (
return (
<View style={[styles.view,
{marginBottom: 3
0}]}>
<View style={[styles.view,
commonStyles.baseShadow, {marginBottom: 1
0}]}>
<View style={styles.myLeavesTitleView}>
<View style={styles.myLeavesTitleView}>
<AppText
<AppText
style={{
style={{
...
...
src/styles/commonStyles.js
0 → 100644
View file @
32fb9014
import
{
Dimensions
,
StyleSheet
}
from
'react-native'
;
import
colors
from
'../values/colors'
;
const
windowWidth
=
Dimensions
.
get
(
'window'
).
width
;
const
windowHeight
=
Dimensions
.
get
(
'window'
).
height
;
const
commonStyles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
},
baseShadow
:
{
shadowColor
:
colors
.
baseShadowColor
,
shadowOffset
:
{
width
:
0
,
height
:
2
,
},
shadowOpacity
:
0.25
,
shadowRadius
:
3.84
,
elevation
:
5
,
},
});
export
default
commonStyles
;
src/values/colors.js
View file @
32fb9014
...
@@ -32,5 +32,6 @@ const colors = {
...
@@ -32,5 +32,6 @@ const colors = {
gray59
:
'#595959'
,
gray59
:
'#595959'
,
grayE9
:
'#e9eaf9'
,
grayE9
:
'#e9eaf9'
,
textColor
:
'#202121'
,
textColor
:
'#202121'
,
baseShadowColor
:
'#000'
,
};
};
export
default
colors
;
export
default
colors
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment