Make TODOs about draft listings into generic comments

The API might not ever support saving unpublished/draft listings, so
no need to keep the TODO comments as tasks in the code.
This commit is contained in:
Kimmo Puputti 2017-10-23 15:05:52 +03:00
parent e6f01befc6
commit d07fd9f63d
6 changed files with 19 additions and 6 deletions

View file

@ -71,7 +71,10 @@ EditListingDescriptionPanel.defaultProps = {
EditListingDescriptionPanel.propTypes = {
className: string,
rootClassName: string,
listing: object, // TODO Should be propTypes.listing after API support is added.
// We cannot use propTypes.listing since the listing might be a draft.
listing: object,
onSubmit: func.isRequired,
onChange: func.isRequired,
submitButtonText: string.isRequired,

View file

@ -86,7 +86,10 @@ EditListingLocationPanel.defaultProps = {
EditListingLocationPanel.propTypes = {
className: string,
rootClassName: string,
listing: object, // TODO Should be propTypes.listing after API support is added.
// We cannot use propTypes.listing since the listing might be a draft.
listing: object,
onSubmit: func.isRequired,
onChange: func.isRequired,
submitButtonText: string.isRequired,

View file

@ -193,7 +193,10 @@ EditListingPhotosPanel.propTypes = {
fetchInProgress: bool.isRequired,
newListingCreated: bool.isRequired,
images: array,
listing: object, // TODO Should be propTypes.listing after API support is added.
// We cannot use propTypes.listing since the listing might be a draft.
listing: object,
onImageUpload: func.isRequired,
onPayoutDetailsFormChange: func.isRequired,
onPayoutDetailsSubmit: func.isRequired,

View file

@ -68,7 +68,10 @@ EditListingPricingPanel.defaultProps = {
EditListingPricingPanel.propTypes = {
className: string,
rootClassName: string,
listing: object, // TODO Should be propTypes.listing after API support is added.
// We cannot use propTypes.listing since the listing might be a draft.
listing: object,
onSubmit: func.isRequired,
onChange: func.isRequired,
submitButtonText: string.isRequired,

View file

@ -276,8 +276,9 @@ EditListingWizard.propTypes = {
push: func.isRequired,
}).isRequired,
images: array.isRequired,
// We cannot use propTypes.listing since the listing might be a draft.
listing: shape({
// TODO Should be propTypes.listing after API support is added.
attributes: shape({
address: string,
description: string,
@ -287,6 +288,7 @@ EditListingWizard.propTypes = {
}),
images: array,
}),
onCreateListing: func.isRequired,
onUpdateListing: func.isRequired,
onCreateListingDraft: func.isRequired,

View file

@ -186,7 +186,6 @@ export const updateImageOrder = imageOrder => ({
payload: { imageOrder },
});
// TODO These temporary listing actions will be changed when API supports unpublished listings
export const createListingDraft = listingData => {
const { description, title } = listingData;
return {