Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2021
Kelas D
PT Gizi Sehat - Dietela
Dietela Mobile
Commits
e6e6531d
Commit
e6e6531d
authored
Jun 29, 2021
by
wulanmantiri
Browse files
[REFACTOR] Fix bugs
parent
49758db5
Pipeline
#84202
passed with stages
in 9 minutes and 10 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/scenes/payment/PaymentWebView/index.tsx
View file @
e6e6531d
...
...
@@ -13,13 +13,17 @@ const PaymentWebView: FC = () => {
const
navigation
=
useNavigation
();
const
route
=
useRoute
();
const
{
url
}
=
route
.
params
as
{
url
:
string
};
const
{
user
}
=
useContext
(
UserContext
);
const
{
user
,
setUser
}
=
useContext
(
UserContext
);
const
postPay
=
async
(
state
:
any
)
=>
{
if
(
state
.
url
.
startsWith
(
`
${
API_BASE_URL
}
/payment/midtrans-redirection`
))
{
await
updateCartApi
(
user
.
cart_id
,
{
const
response
=
await
updateCartApi
(
user
.
cart_id
,
{
transaction_status
:
TransactionStatus
.
SUCCESS
,
});
setUser
({
...
user
,
nutritionist
:
response
.
data
?.
nutritionist
||
null
,
});
navigation
.
navigate
(
ROUTES
.
paymentResult
);
}
};
...
...
src/services/auth/models.ts
View file @
e6e6531d
...
...
@@ -27,7 +27,11 @@ export interface User {
deadline
:
string
|
null
;
}
export
interface
AuthUserResponse
extends
User
{
export
interface
AuthUserResponse
{
id
:
number
|
null
;
email
:
string
;
name
:
string
;
role
:
UserRole
|
null
;
transaction_status
:
TransactionStatus
|
null
;
is_finished_onboarding
:
boolean
;
cart_id
:
number
|
null
;
...
...
src/services/nutritionists/models.ts
View file @
e6e6531d
...
...
@@ -8,4 +8,5 @@ export interface Nutritionist {
another_practice_place
:
string
;
languages
:
string
;
profile_picture
?:
string
;
phone_number
:
string
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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