Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
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
G
beasy-mobile
Commits
a05da542
You need to sign in or sign up before continuing.
Commit
a05da542
authored
Sep 11, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restyle a little bit around the use of cardvariant, dimensions and background
parent
209a1ea6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
39 deletions
+43
-39
HomePageWithPaymentOptions.tsx
src/screens/HomePageWithPaymentOptions.tsx
+43
-39
No files found.
src/screens/HomePageWithPaymentOptions.tsx
View file @
a05da542
import
type
{
PaymentStackScreenComponentProps
}
from
"@/navigations/Types"
;
import
type
{
PaymentStackScreenComponentProps
}
from
"@/navigations/Types"
;
import
getPaymentTypes
from
"@/utils/requests/getPaymentTypes"
;
import
getPaymentTypes
from
"@/utils/requests/getPaymentTypes"
;
import
BalanceContainer
from
"@components/BalanceContainer"
;
import
BarWithBeasyAndNotificationsIcon
from
"@components/BarWithBeasyAndNotificationsIcon"
;
import
BarWithBeasyAndNotificationsIcon
from
"@components/BarWithBeasyAndNotificationsIcon"
;
import
PaymentOption
from
"@components/PaymentOption"
;
import
PaymentOption
from
"@components/PaymentOption"
;
import
Box
from
"@components/bases/Box"
;
import
Box
from
"@components/bases/Box"
;
...
@@ -35,59 +36,62 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith
...
@@ -35,59 +36,62 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith
);
);
return
(
return
(
// <BeasyDefaultBackgroundWrapper>
<
WrapperWithDefaultBeasyBackgroundAndSafeAreaTopLeftRight
>
<
WrapperWithDefaultBeasyBackgroundAndSafeAreaTopLeftRight
>
<
Box
style=
{
{
height
:
"100%"
}
}
flexDirection=
{
"column"
}
>
<
Box
style=
{
{
height
:
"100%"
}
}
flexDirection=
{
"column"
}
>
<
BarWithBeasyAndNotificationsIcon
/>
<
BarWithBeasyAndNotificationsIcon
/>
<
Card
<
Card
variant=
{
"curvedTopContainer"
}
variant=
{
"curvedTopContainer"
}
height=
{
Dimensions
.
get
(
"window"
).
height
/
2
+
150
}
height=
{
Dimensions
.
get
(
"window"
).
height
/
2
+
150
}
// marginTop={"auto"}
style=
{
{
marginTop
:
"auto"
}
}
style=
{
{
marginTop
:
"auto"
}
}
padding=
{
"l"
}
padding=
{
"l"
}
>
>
<
Box
height=
{
100
}
>
<
Box
position=
{
"relative"
}
top=
{
-
120
}
>
<
Text
fontSize=
{
20
}
fontWeight=
{
"bold"
}
>
<
Box
alignSelf=
{
"center"
}
>
Types de paiement
<
BalanceContainer
balance=
{
78000
}
label=
"Total des ventes"
/>
</
Text
>
</
Box
>
</
Box
>
<
Box
marginVertical=
{
"l"
}
>
<
Text
fontSize=
{
20
}
fontWeight=
{
"bold"
}
>
Types de paiement
</
Text
>
</
Box
>
<
Box
<
Box
flex=
{
1
}
flex=
{
1
}
flexDirection=
{
"row"
}
flexDirection=
{
"row"
}
justifyContent=
{
"space-between"
}
justifyContent=
{
"space-between"
}
flexWrap=
{
"wrap"
}
flexWrap=
{
"wrap"
}
rowGap=
{
"m"
}
rowGap=
{
"m"
}
>
>
{
isLoading
&&
(
{
isLoading
&&
(
<
Box
flex=
{
1
}
>
<
Box
flex=
{
1
}
>
<
Text
textAlign=
{
"center"
}
>
<
Text
textAlign=
{
"center"
}
>
Chargement des méthodes de paiement...
Chargement des méthodes de paiement...
</
Text
>
</
Text
>
</
Box
>
</
Box
>
)
}
)
}
{
!
isLoading
&&
{
!
isLoading
&&
!
error
&&
!
error
&&
paymentTypesWithActiveStatus
.
map
((
paymentType
)
=>
(
paymentTypesWithActiveStatus
.
map
((
paymentType
)
=>
(
<
PaymentOptionContainer
key=
{
paymentType
.
id
}
>
<
PaymentOptionContainer
key=
{
paymentType
.
id
}
>
<
PaymentOption
<
PaymentOption
onPress=
{
()
=>
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
,
{
navigation
.
navigate
(
paymentType
:
paymentType
.
code
,
"paymentAmountInputScreen"
,
})
{
}
paymentType
:
paymentType
.
code
,
paymentMethod=
{
paymentType
.
code
}
},
/>
)
</
PaymentOptionContainer
>
}
))
}
paymentMethod=
{
paymentType
.
code
}
/>
</
PaymentOptionContainer
>
))
}
</
Box
>
</
Box
>
</
Box
>
</
Card
>
</
Card
>
{
/* <Box height={150} alignItems={"center"} justifyContent={"center"}>
<BalanceContainer balance={78000} label="Total des ventes" />
</Box> */
}
</
Box
>
</
Box
>
</
WrapperWithDefaultBeasyBackgroundAndSafeAreaTopLeftRight
>
</
WrapperWithDefaultBeasyBackgroundAndSafeAreaTopLeftRight
>
// </BeasyDefaultBackgroundWrapper>
);
);
};
};
...
...
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