Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented: support to add picker for ready to pick orders(#85zrnzf31) #187

Merged
merged 20 commits into from
Mar 2, 2023

Conversation

disha1202
Copy link
Contributor

Related Issues

Closes #186

Short Description and Why It's Useful

Screenshots of Visual Changes before/after (If There Are Any)

Contribution and Currently Important Rules Acceptance

@disha1202 disha1202 marked this pull request as ready for review March 1, 2023 13:59
const formData = new FormData();
formData.append("facilityId", items[0].facilityId);
items.map((item: any) => {
formData.append("itemStatusId_o_"+items.indexOf(item), "PICKITEM_PENDING")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think map method has index
map((element, index) => { /* … */ })
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map#syntax

import { translate } from '@/i18n'

const actions: ActionTree<PicklistState, RootState> = {
async createPicklist ({ commit }, payload) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need state for this, we could use methods. We are not storing anything shared in state

// TODO: having issue when creating more than 2 groups in performFind, searching always work on first two groups
// For now enabled searching on first name and externalId
inputFields = {
firstName_fld0_value: this.queryString,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do need fld0 and fld1

Suggested change
firstName_fld0_value: this.queryString,
firstName_fld0_value: this.queryString,

event.target.complete();
});
},
async fetchPickers(vSize, vIndex) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
async fetchPickers(vSize, vIndex) {
async getPicker(vSize, vIndex) {

total = resp.data.count;
} else {
console.error(translate('Something went wrong'))
this.availablePickers = [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this empty list for pagination as well. Same in catch block

@@ -14,7 +14,8 @@ const userModule: Module<UserState, RootState> = {
instanceUrl: '',
preference: {
showShippingOrders: true,
showPackingSlip: false
showPackingSlip: false,
configurePicker: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default it should be false, as pre the current behaviour

Comment on lines 392 to 402
if (resp.status === 200 && !hasError(resp) && resp.data) {
if(!(resp.data.picklistId && resp.data.picklistBinId)) {
showToast(translate('Something went wrong. Picklist can not be created.'));
emitter.emit("dismissLoader");
return;
}
} else {
showToast(translate('Something went wrong. Picklist can not be created.'));
emitter.emit("dismissLoader");
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (resp.status === 200 && !hasError(resp) && resp.data) {
if(!(resp.data.picklistId && resp.data.picklistBinId)) {
showToast(translate('Something went wrong. Picklist can not be created.'));
emitter.emit("dismissLoader");
return;
}
} else {
showToast(translate('Something went wrong. Picklist can not be created.'));
emitter.emit("dismissLoader");
return;
}
if (resp.status !== 200 || hasError(resp) || !(resp.data.picklistId && resp.data.picklistBinId)) {
showToast(translate('Something went wrong. Picklist can not be created.'));
emitter.emit("dismissLoader");
return;
}

@adityasharma7 adityasharma7 merged commit 71959f8 into hotwax:main Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support to assign picker for open orders
2 participants