Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
safetcut-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
safetcut-app
Commits
dd12ef10
Commit
dd12ef10
authored
Aug 23, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update notification tab header style, fix invalid custom filter
parent
e5ba164c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
screens/Private/NotificationScreen/NotificationScreen.js
+15
-9
No files found.
screens/Private/NotificationScreen/NotificationScreen.js
View file @
dd12ef10
...
...
@@ -28,8 +28,8 @@ export default class NotificationScreen extends React.Component {
filterData
:
[],
initial
:
[],
isfilterVisible
:
false
,
selectedStartDate
:
n
ull
,
selectedEndDate
:
n
ull
,
selectedStartDate
:
n
ew
Date
()
,
selectedEndDate
:
n
ew
Date
()
,
filterBy
:
null
,
toggleCalendar
:
false
,
};
...
...
@@ -135,11 +135,14 @@ export default class NotificationScreen extends React.Component {
console
.
log
(
'filter last month'
);
}
else
if
(
filterBy
===
'custom'
)
{
console
.
log
(
'filter custom'
);
const
start
=
getTime
(
selectedStartDate
);
const
end
=
endOfDay
(
getTime
(
selectedEndDate
));
const
end
=
endOfDay
(
getTime
(
selectedEndDate
===
null
?
selectedStartDate
:
selectedEndDate
));
const
newData
=
initial
.
filter
(
x
=>
{
return
x
.
time
*
1000
<=
end
&&
x
.
time
*
1000
>
start
;
});
console
.
log
(
'start'
,
start
,
'end'
,
end
,
'start state'
,
selectedStartDate
,
'end state'
,
selectedEndDate
);
this
.
setState
({
filterData
:
newData
});
}
else
if
(
filterBy
===
'all'
)
{
this
.
setState
({
filterData
:
initial
});
...
...
@@ -165,9 +168,11 @@ export default class NotificationScreen extends React.Component {
<
View
style
=
{{
display
:
'flex'
,
flexDirection
:
'column'
,
flex
:
1
}}
>
<
View
style
=
{[
theme
.
rowContainer
,
{
justifyContent
:
'space-between'
,
marginBottom
:
5
}]}
>
{
/* operate's username */
}
<
Text
style
=
{[
theme
.
smDescription
]}
>
{
data
.
user
||
'unknown'
}
<
/Text
>
<
Text
style
=
{[
theme
.
smDescription
,
{
color
:
'#b9babc'
}
]}
>
{
data
.
user
||
'unknown'
}
<
/Text
>
{
/* operate time */
}
<
Text
style
=
{[
theme
.
smDescription
]}
>
{
format
(
data
.
time
*
1000
,
'hh:mm A'
)}
<
/Text
>
<
Text
style
=
{[
theme
.
smDescription
,
{
color
:
'#b9babc'
}]}
>
{
format
(
data
.
time
*
1000
,
'hh:mm A'
)}
<
/Text
>
<
/View
>
{
/* operate action. */
}
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDark
]}
>
...
...
@@ -233,7 +238,8 @@ export default class NotificationScreen extends React.Component {
style
=
{[
styles
.
pickerContainer
,
theme
.
mt2
,
theme
.
rowContainer
,
{
justifyContent
:
'space-between'
}]}
>
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDark
]}
>
{
format
(
startDate
,
'DD-MM-YYYY'
)}
-
{
format
(
endDate
,
'DD-MM-YYYY'
)}
{
format
(
startDate
,
'DD-MM-YYYY'
)}
{
endDate
===
''
?
''
:
' - '
+
format
(
endDate
,
'DD-MM-YYYY'
)}
<
/Text
>
<
Icon
type
=
"MaterialCommunityIcons"
...
...
@@ -282,9 +288,9 @@ export default class NotificationScreen extends React.Component {
render
()
{
const
TabStyle
=
{
textStyle
:
theme
.
description
,
activeTextStyle
:
[
theme
.
description
,
theme
.
text
White
],
tabStyle
:
{
backgroundColor
:
color
.
white
,
borderRadius
:
100
,
margin
:
10
},
activeTabStyle
:
{
backgroundColor
:
color
.
primary
,
borderRadius
:
100
,
margin
:
10
},
activeTextStyle
:
[
theme
.
description
,
theme
.
text
Dark
],
tabStyle
:
{
backgroundColor
:
'transparent'
,
borderRadius
:
100
,
margin
:
10
},
activeTabStyle
:
{
backgroundColor
:
'rgba(238, 84, 84, 0.15)'
,
borderRadius
:
100
,
margin
:
10
},
style
:
{
backgroundColor
:
color
.
defaultBg
},
};
return
(
...
...
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