Subversion Repositories SmartDukaan

Rev

Rev 36802 | Rev 36847 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36802 Rev 36811
Line 485... Line 485...
485
										builtVisits.push({
485
										builtVisits.push({
486
											id: v.fofoId, type: 'lead',
486
											id: v.fofoId, type: 'lead',
487
											name: 'LEAD #' + v.fofoId, code: 'LEAD',
487
											name: 'LEAD #' + v.fofoId, code: 'LEAD',
488
											lat: null, lng: null, isLead: true
488
											lat: null, lng: null, isLead: true
489
										});
489
										});
-
 
490
									} else if (v.visitType === 'office') {
-
 
491
										// Office stops are enriched server-side because the partner
-
 
492
										// map doesn't cover them. Lat/lng come from logistics.company_office.
-
 
493
										builtVisits.push({
-
 
494
											id: v.fofoId, type: 'office',
-
 
495
											name: (v.code ? v.code + ' - ' : '') + (v.name || 'Office #' + v.fofoId),
-
 
496
											code: v.code || 'OFFICE',
-
 
497
											lat: v.latitude ? parseFloat(v.latitude) : null,
-
 
498
											lng: v.longitude ? parseFloat(v.longitude) : null,
-
 
499
											isOffice: true
-
 
500
										});
490
									} else {
501
									} else {
491
										var p = partnerMap[v.fofoId];
502
										var p = partnerMap[v.fofoId];
492
										if (p) builtVisits.push({
503
										if (p) builtVisits.push({
493
											id: p.fofoId, type: 'partner',
504
											id: p.fofoId, type: 'partner',
494
											name: p.code + ' - ' + (p.outletName || p.businessName || ''),
505
											name: p.code + ' - ' + (p.outletName || p.businessName || ''),
Line 693... Line 704...
693
                                            name: 'LEAD #' + v.fofoId,
704
                                            name: 'LEAD #' + v.fofoId,
694
                                            code: 'LEAD',
705
                                            code: 'LEAD',
695
                                            lat: null, lng: null,
706
                                            lat: null, lng: null,
696
                                            isLead: true
707
                                            isLead: true
697
                                        });
708
                                        });
-
 
709
									} else if (v.visitType === 'office') {
-
 
710
										builtVisits.push({
-
 
711
											id: v.fofoId, type: 'office',
-
 
712
											name: (v.code ? v.code + ' - ' : '') + (v.name || 'Office #' + v.fofoId),
-
 
713
											code: v.code || 'OFFICE',
-
 
714
											lat: v.latitude ? parseFloat(v.latitude) : null,
-
 
715
											lng: v.longitude ? parseFloat(v.longitude) : null,
-
 
716
											isOffice: true
-
 
717
										});
698
                                    } else {
718
                                    } else {
699
                                        var p = partnerMap[v.fofoId];
719
                                        var p = partnerMap[v.fofoId];
700
                                        if (p) {
720
                                        if (p) {
701
                                            builtVisits.push({
721
                                            builtVisits.push({
702
                                                id: p.fofoId, type: 'partner',
722
                                                id: p.fofoId, type: 'partner',