-
Notifications
You must be signed in to change notification settings - Fork 554
fix: pending ticket redirected to payment page. #2356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
…edirected to payment page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a lot of unrelated indentation changes. Please fix it and make sure the build passes
Also, follow the guidelines: https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia/
|
ok @nikit19 |
@liveHarshit Why do Travis build keeps getting failed.
|
Check the logs: https://travis-ci.org/fossasia/open-event-attendee-android/builds/587602382?utm_source=github_status&utm_medium=notification and comment: #2346 (comment) |
@liveHarshit Semantic pull request is not passing.help needed. |
You still haven't written the title in the same format as required. You are a programmer. You should know this. if a > b:
print('Hello') ifa > b:
print('Hello') Are both of these statement equivalent? |
space between if and a. All checks passed . Thank you @iamareebjamal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide GIF.
@@ -29,7 +29,7 @@ class OrdersViewHolder(private val binding: ItemCardOrderBinding) : RecyclerView | |||
} | |||
|
|||
itemView.setOnClickListener { | |||
listener?.onClick(event.id, order.identifier ?: "", order.id) | |||
listener?.onClick(event.id, order.identifier ?: "", order.id, event, order) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the parameters to a class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamareebjamal this OrderClickListener is used in more 3 fragments. If I change here I have to do that at all places. Should I do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the point of refactoring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamareebjamal ok.all the 5 parameters should be replaced to 1 , right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, why are you transferring entire event and order. By that logic, there is no requirement for transferring first 3 parameters
@liveHarshit Here is a gif. |
findNavController(rootView).navigate(OrdersUnderUserFragmentDirections | ||
.actionOrderUserToOrderDetails(eventID, orderIdentifier, orderId)) | ||
override fun onClick(eventID: Long, orderIdentifier: String, orderId: Long, event: Event, order: Order) { | ||
if (order.status.equals("completed") || order.status.equals("placed")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use equals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamareebjamal Then how should I check the status is pending or completed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liveHarshit What you have to say about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you check for equality of 2 strings in kotlin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"==" ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
findNavController(rootView).navigate(OrdersUnderUserFragmentDirections | ||
.actionOrderUserToOrderDetails(eventID, orderIdentifier, orderId)) | ||
} else if (order.status.equals("cancelled")) { | ||
rootView.snackbar("Event is Cancelled") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
} else if (order.status.equals("cancelled")) { | ||
rootView.snackbar("Event is Cancelled") | ||
} else if (order.status.equals("expired")) { | ||
rootView.snackbar("Event is Expired") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
…d to the payment page
Fixes #2077
Changes: Snackbar is now showing for orders that are expired and canceled and not generating tickets for them. For pending payments user is now redirected to the payment page of their respective payment method.