fix: agents filtering problem in send product draft

This commit is contained in:
Mahyar Khanbolooki
2025-07-15 18:23:39 +03:30
parent aa25382d9e
commit 8a37d3f1ef
+6 -2
View File
@@ -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')
) )
} }
} }