mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Merge pull request #758 from sharetribe/update-has-orders-after-enquiry
Update current user having orders after creating enquiry
This commit is contained in:
commit
fb56e5d4d8
2 changed files with 5 additions and 2 deletions
|
|
@ -199,8 +199,10 @@ class TopbarComponent extends Component {
|
|||
);
|
||||
const isNotWhitelisted = !whitelistedPaths.includes(newLocation.pathname);
|
||||
|
||||
const showReminder = infoMissing && isNotWhitelisted && hasListingsOrOrders && showOnPathChange;
|
||||
|
||||
// Show reminder
|
||||
if (infoMissing && isNotWhitelisted && hasListingsOrOrders && showOnPathChange) {
|
||||
if (showReminder) {
|
||||
this.setState({ showMissingInformationReminder: true });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { addMarketplaceEntities } from '../../ducks/marketplaceData.duck';
|
|||
import { denormalisedResponseEntities } from '../../util/data';
|
||||
import { TRANSITION_ENQUIRE } from '../../util/types';
|
||||
import { LISTING_PAGE_PENDING_APPROVAL_VARIANT } from '../../util/urlHelpers';
|
||||
import { fetchCurrentUser } from '../../ducks/user.duck';
|
||||
import { fetchCurrentUser, fetchCurrentUserHasOrdersSuccess } from '../../ducks/user.duck';
|
||||
|
||||
const { UUID } = sdkTypes;
|
||||
|
||||
|
|
@ -167,6 +167,7 @@ export const sendEnquiry = (listingId, message) => (dispatch, getState, sdk) =>
|
|||
// Send the message to the created transaction
|
||||
return sdk.messages.send({ transactionId, content: message }).then(() => {
|
||||
dispatch(sendEnquirySuccess());
|
||||
dispatch(fetchCurrentUserHasOrdersSuccess(true));
|
||||
return transactionId;
|
||||
});
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue