This repository was archived by the owner on May 21, 2020. It is now read-only.
ref: useUserAddressFactory#381
Open
defudef wants to merge 9 commits into
Open
Conversation
filrak
reviewed
Apr 14, 2020
patzick
reviewed
Apr 16, 2020
defudef
commented
Apr 17, 2020
defudef
commented
Apr 17, 2020
filrak
suggested changes
Apr 20, 2020
| // ...leave all the stuff as they are now | ||
|
|
||
| // needed to add this: | ||
| setUser: (newUser: USER) => void; |
Contributor
There was a problem hiding this comment.
It shouldn't be a part of params, we have access to this object from the inside therefore we can just return this fn
filrak
reviewed
Apr 20, 2020
| ```TS | ||
| export interface UseUserAddress<ADDRESS, SEARCH_PARAMS, ADDRESS_OPTIONS = unknown> { | ||
| addresses: ComputedProperty<ADDRESS[]>; | ||
| shippingAddresses: ComputedProperty<ADDRESS[]>; |
Contributor
There was a problem hiding this comment.
can we have multiple shipping addressess and billing addresses? Does every address have to be in a specific category?
| shippingAddresses: ComputedProperty<ADDRESS[]>; | ||
| billingAddresses: ComputedProperty<ADDRESS[]>; | ||
| loadAddresses: (params?: SEARCH_PARAMS) => Promise<void>; | ||
| addAddress: (address: ADDRESS, options?: ADDRESS_OPTIONS) => Promise<void>; |
patzick
suggested changes
Apr 20, 2020
Contributor
patzick
left a comment
There was a problem hiding this comment.
- We'll leave only addresses, getters may filter shipping and billing addresses from it.
There should be an additional field in address, which would be considered by getters to filter addresses of different types. ( ex__type) - for saving address there is only
saveAddressmethod
Comment on lines
+15
to
+16
| addAddress: (address: ADDRESS, options?: ADDRESS_OPTIONS) => Promise<void>; | ||
| updateAddress: (address: ADDRESS, options?: ADDRESS_OPTIONS) => Promise<void>; |
Contributor
There was a problem hiding this comment.
Suggested change
| addAddress: (address: ADDRESS, options?: ADDRESS_OPTIONS) => Promise<void>; | |
| updateAddress: (address: ADDRESS, options?: ADDRESS_OPTIONS) => Promise<void>; | |
| saveAddress: (address: ADDRESS, options?: ADDRESS_OPTIONS) => Promise<void>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.