Closed sdaigle2 closed 8 years ago
@sdaigle2, I'm currently implementing the feature of editing existing discounts and I'd like you to clarify what field should be possible to edit. Because, same as for deletion, changing discount name (id) might affect the orders that have been placed using old names.
@as-david-m, Good question. Please prevent the user from editing the discount name. Allow them to edit everything else. If they click delete, don't delete it. Just set the end date as some time in the past.
@sdaigle2, I wanted to make sure, submitting a payment on admin page for an order should just push another payment object to the array of payments and change order statuses accordingly in database without real credit card payments, right ?
You are correct. You should push to the same array of payments.
Please add one more payment type on the admin payments page. It should be called "Credit" and you should treat it just like cash. This should not appear as an option on the regular payments page.
I have merged the pull request, but I do have a few more requests for you to work on:
1.) On the order admin page, the user should be able to click Submit for the payment separately from the save button. 2.) When you create a discount, you are limited to 25% if you are an admin. Only superAdmin can create higher discounts. When you edit a discount, the same limit should be forced. 3.) If the search command is difficult to implement, then please just comment out the button.
Currently search on all the pages filters out the items by their Id. On orders page it's possible also to filter by other fields. Is there anything else you would like the search to do ? Why should it be considered unavailable ? As for discount codes for admin users, the same limitation exists for editing, however, the error message might not be the clearest, so I slightly changed it; Also, separated adding payments from saving statuses on orders page.
While testing we noticed two errors error. When you make a payment on the Admin page, the payment goes through, but it doesn't make it into stripe. The payment does not appear on the user's orders page either.
1.) Place a test order and pay $1000 with a credit card 2.) Go to stripe, and notice the $1000 charge. 3.) Go to the Admin page 4.) Pay $100 with a credit card on the admin page 5.) Look at the order on the admin page. Notice that it says that you have paid $1100 total. Good! 6.) Go to your user orders, look at that order. Notice that it says that you have only paid $1000. Bad! 7.) Log in to stripe, notice that the payment does not appear in stripe. Bad! 8.) Log in to cloudant, notice that the payment is properly documented in the database. Good!
The problem on step 6 (user orders) happens because the page does not reload on view change thus data does not update. It takes a page refresh to see the latest payments from admin page. I'm going to fix this issue. Unfortunately, the problem on step 6 happened because of a small misunderstanding. I must have put my question vaguely:
@sdaigle2, I wanted to make sure, submitting a payment on admin page for an order should just push another payment object to the array of payments and change order statuses accordingly in database without real credit card payments, right ?
I'm going to fix that too. It won't take long.
We have merged this branch into master branch. Please pull before you make any changes. BTW, I am Brian. You have never met me before. I am just back from vacation. I am working with Scott on Tinker project together.
Nice to meet you, Brian. I'm going to create a new branch and push upcoming fixes there.
Everything seams to work well. Fixed with Commit 74df2a31b470d4fd826b497f0f0b52f429b48f11. Good Job @as-david-m
The admin page needs more some more features, and I'm going to challenge you to do this without a mockup. This is a page that only a few people see so it's ok if it doesn't look as pretty as the rest of site. This issue should be done only after issue #56 Partial Payments is completed.
Admin Page Features:
Sub-pages
The Admin page should be split into sub pages much like the settings page is. On the settings page, you can switch between my designs, my account, and my orders. On the admin page, you should be able to switch between:
Discount Codes
We've already created the ability to create discount codes. We now need the ability to:
Optionally, create a feature to search for discount codes, but I'm not certain if this is necessary.
Users
The user sub-page of the Admin page should do the following:
Optionally, create a feature to search for users, but I'm not certain if this is necessary.
Orders
The orders sup-page of the admin page should do the following:
Optionally you should be able to search by date, user, and anything. I'm not certain if this is necessary, but if it is easy, please implement it.