mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-27 19:42:11 +10:00
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:
parent
e6f01befc6
commit
d07fd9f63d
6 changed files with 19 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue