fix: agents filtering problem in send product draft
This commit is contained in:
@@ -108,15 +108,19 @@ export default {
|
|||||||
return this.agents.filter(item => {
|
return this.agents.filter(item => {
|
||||||
// Handle new representation_type format (array)
|
// Handle new representation_type format (array)
|
||||||
if (Array.isArray(item.representation_type)) {
|
if (Array.isArray(item.representation_type)) {
|
||||||
|
if (item.representation_type.includes('both')) return true;
|
||||||
if (this.draft.db_name === 'verity') {
|
if (this.draft.db_name === 'verity') {
|
||||||
return (
|
return (
|
||||||
item.representation_type.includes('mobile_accessories') ||
|
item.representation_type.includes('mobile_accessories') ||
|
||||||
item.representation_type.includes('computer_accessories') ||
|
item.representation_type.includes('computer_accessories') ||
|
||||||
item.representation_type.includes('memory_products')
|
item.representation_type.includes('memory_products') ||
|
||||||
|
item.representation_type.includes('verity')
|
||||||
)
|
)
|
||||||
} else if (this.draft.db_name === 'panatech') {
|
} else if (this.draft.db_name === 'panatech') {
|
||||||
return (
|
return (
|
||||||
item.representation_type.includes('car_audio_video') || item.representation_type.includes('home_products')
|
item.representation_type.includes('car_audio_video') ||
|
||||||
|
item.representation_type.includes('home_products') ||
|
||||||
|
item.representation_type.includes('panatech')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user