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

Add image to assign seller window #1541

Merged
merged 1 commit into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ export default {
}
const newAddress = { uuid: customer.uuid, value: customer.value, taxId: customer.taxId, name: customer.name, addresses, posUuid: this.$store.getters.posAttributes.currentPointOfSales.uuid }
newAddress.uuid = this.isEmptyValue(customer.uuid) ? this.$store.getters.getValueOfField({ containerUuid: this.$route.meta.uuid, columnName: 'C_BPartner_ID_UUID' }) : customer.uuid
newAddress.value = this.isEmptyValue(customer.value) ? this.addressToUpdate.value : customer.value
newAddress.value = this.isEmptyValue(this.$store.getters.getNewCustomer.value) ? this.addressToUpdate.value : this.$store.getters.getNewCustomer.value
newAddress.name = this.$store.getters.getNewCustomer.name
updateCustomer(newAddress)
.then(response => {
const orderUuid = this.$store.getters.posAttributes.currentPointOfSales.currentOrder.uuid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default [
overwriteDefinition: {
sequence: 0,
size: 6,
componentPath: 'FieldText',
isCustomField: true
}
},
Expand All @@ -33,6 +34,7 @@ export default [
isFromDictionary: true,
overwriteDefinition: {
sequence: 1,
componentPath: 'FieldText',
size: 6,
isCustomField: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ export default {
const clear = false
this.clearAccountData(clear)
this.currentFieldPaymentMethods = this.isEmptyValue(this.searchPaymentMethods) ? '' : this.searchPaymentMethods[0].uuid
if (this.isEmptyValue(value) && this.showDialogo) {
if (this.isEmptyValue(value) && this.showDialogo && !this.isEmptyValue(this.selectionTypeRefund.refund_reference_currency)) {
this.findRefundCurrencyConversion(this.selectionTypeRefund.refund_reference_currency)
}
},
Expand Down Expand Up @@ -993,7 +993,7 @@ export default {
const fieldBank = this.fieldsList.find(fields => fields.columnName === 'C_Bank_ID')
let listBank
if (!this.isEmptyValue(fieldBank) && fieldBank.reference) {
listBank = this.$store.getters.getLookupList({
listBank = this.$store.getters.getStoredLookupList({
containerUuid: this.metadata.containerUuid,
query: fieldBank.reference.query,
tableName: fieldBank.reference.tableName
Expand Down Expand Up @@ -1088,7 +1088,7 @@ export default {
},
{
columnName: 'C_Bank_ID',
value: value.bank.id
value: value.bank.value
},
{
columnName: 'C_Bank_ID_UUID',
Expand Down
19 changes: 15 additions & 4 deletions src/components/ADempiere/Form/VPOS/Options/AssignSeller/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<el-card class="box-card" style="padding-left: 0px;padding-right: 0px;">
<el-scrollbar wrap-class="scroll-seller">
<el-row style="padding: 2px">
<template v-for="(seller, key) in listSeller">
<template v-for="(seller, key) in listSellers">
<el-col :key="key" :span="8">
<el-card
:shadow="seller.uuid === salesRepresentative.uuid ? 'always' : 'never'"
Expand All @@ -34,7 +34,7 @@
shape="circle"
:size="100"
fit="fill"
:src="avatarResize(seller.image)"
:src="seller.image"
/>
</div>
<div class="footer-product">
Expand Down Expand Up @@ -141,6 +141,17 @@ export default {
},
showAssignSeller() {
return this.isEmptyValue(this.$store.getters.getShowAssignSeller) ? false : this.$store.getters.getShowAssignSeller
},
listSellers() {
if (!this.isEmptyValue(this.listSeller)) {
return this.listSeller.map(seller => {
return {
...seller,
image: this.avatarResize(seller.image)
}
})
}
return []
}
},
watch: {
Expand All @@ -161,8 +172,8 @@ export default {

const { uri } = getImagePath({
file: image,
width: 40,
height: 40
width: 500,
height: 500
})

return uri
Expand Down