-
Notifications
You must be signed in to change notification settings - Fork 41
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
Conversation
updated: logic to store pickers details in data property in assignPickerModal instead of state as we are caching the api calls removed unwanted code fix ui in case of no picker found(#85zrnzf31)
const formData = new FormData(); | ||
formData.append("facilityId", items[0].facilityId); | ||
items.map((item: any) => { | ||
formData.append("itemStatusId_o_"+items.indexOf(item), "PICKITEM_PENDING") |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
src/views/AssignPickerModal.vue
Outdated
// 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, |
There was a problem hiding this comment.
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
firstName_fld0_value: this.queryString, | |
firstName_fld0_value: this.queryString, |
src/views/AssignPickerModal.vue
Outdated
event.target.complete(); | ||
}); | ||
}, | ||
async fetchPickers(vSize, vIndex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async fetchPickers(vSize, vIndex) { | |
async getPicker(vSize, vIndex) { |
src/views/AssignPickerModal.vue
Outdated
total = resp.data.count; | ||
} else { | ||
console.error(translate('Something went wrong')) | ||
this.availablePickers = []; |
There was a problem hiding this comment.
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
src/store/modules/user/index.ts
Outdated
@@ -14,7 +14,8 @@ const userModule: Module<UserState, RootState> = { | |||
instanceUrl: '', | |||
preference: { | |||
showShippingOrders: true, | |||
showPackingSlip: false | |||
showPackingSlip: false, | |||
configurePicker: true, |
There was a problem hiding this comment.
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
src/store/modules/order/actions.ts
Outdated
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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; | |
} |
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