Subversion Repositories SmartDukaan

Rev

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

Rev 36800 Rev 36802
Line 210... Line 210...
210
	var html = '';
210
	var html = '';
211
	matches.forEach(function (p) {
211
	matches.forEach(function (p) {
212
		var day = inRoute[p.fofoId];
212
		var day = inRoute[p.fofoId];
213
		var nameLine = (p.outletName || p.businessName || '');
213
		var nameLine = (p.outletName || p.businessName || '');
214
		if (p.city) nameLine += (nameLine ? ' - ' : '') + p.city;
214
		if (p.city) nameLine += (nameLine ? ' - ' : '') + p.city;
-
 
215
		var inactiveBadge = (p.active === false)
-
 
216
			? ' <span style="background:#7c2d12;color:#fed7aa;padding:1px 6px;border-radius:3px;font-size:10px;font-weight:600;">Inactive</span>'
-
 
217
			: '';
215
		if (day) {
218
		if (day) {
216
			html += '<div class="bp-partner-row in-route" style="padding:8px 10px; font-size:11px;'
219
			html += '<div class="bp-partner-row in-route" style="padding:8px 10px; font-size:11px;'
217
				+ ' color:#94a3b8; border-bottom:1px solid #0f172a; cursor:not-allowed;">'
220
				+ ' color:#94a3b8; border-bottom:1px solid #0f172a; cursor:not-allowed;">'
218
				+ '<div style="font-weight:600;">' + (p.code || '') + '</div>'
221
				+ '<div style="font-weight:600;">' + (p.code || '') + inactiveBadge + '</div>'
219
				+ '<div>' + nameLine + ' <span style="color:#22c55e;">(in D' + day + ')</span></div>'
222
				+ '<div>' + nameLine + ' <span style="color:#22c55e;">(in D' + day + ')</span></div>'
220
				+ '</div>';
223
				+ '</div>';
221
		} else {
224
		} else {
222
			html += '<div class="bp-partner-row" data-fofoid="' + p.fofoId + '"'
225
			html += '<div class="bp-partner-row" data-fofoid="' + p.fofoId + '"'
223
				+ ' style="padding:8px 10px; font-size:12px; color:#e2e8f0;'
226
				+ ' style="padding:8px 10px; font-size:12px; color:#e2e8f0;'
224
				+ ' border-bottom:1px solid #0f172a; cursor:pointer;">'
227
				+ ' border-bottom:1px solid #0f172a; cursor:pointer;">'
225
				+ '<div style="font-weight:600;">' + (p.code || '') + '</div>'
228
				+ '<div style="font-weight:600;">' + (p.code || '') + inactiveBadge + '</div>'
226
				+ '<div style="font-size:11px; color:#94a3b8;">' + nameLine + '</div>'
229
				+ '<div style="font-size:11px; color:#94a3b8;">' + nameLine + '</div>'
227
				+ '</div>';
230
				+ '</div>';
228
		}
231
		}
229
	});
232
	});
230
	$sug.html(html).show();
233
	$sug.html(html).show();