DmitrMakeev
commited on
Commit
•
bd9f360
1
Parent(s):
7a04679
Update bas_vk_tab.html
Browse files- bas_vk_tab.html +16 -7
bas_vk_tab.html
CHANGED
@@ -287,6 +287,21 @@ button:hover, #filter-clear:hover, #download-json:hover, #take-for-yourself:hove
|
|
287 |
return link2 + `<img src="${imageUrlvk2}" alt="Image" style="width: 98px; height: 14px;">`;
|
288 |
}
|
289 |
}},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
{title:"Город", field:"b_city", width:95},
|
291 |
{title:"Email", field:"email", width:95},
|
292 |
{title:"Реплики", field:"b_mess", width:95, cellClick:function(e, cell){
|
@@ -333,13 +348,7 @@ button:hover, #filter-clear:hover, #download-json:hover, #take-for-yourself:hove
|
|
333 |
var ad_url = cell.getValue();
|
334 |
return `<a href="${ad_url}" target="_blank">${ad_url}</a>`;
|
335 |
}},
|
336 |
-
|
337 |
-
var chatId = cell.getValue();
|
338 |
-
if (chatId.startsWith('@')) {
|
339 |
-
chatId = chatId.substring(1); // Удаление символа @ в начале
|
340 |
-
}
|
341 |
-
return `<a href="https://t.me/${chatId}" target="_blank">${chatId}</a>`;
|
342 |
-
}},
|
343 |
{title:"Вебинары-присутствовал", field:"web_st", formatter:"star", formatterParams:{stars:7}, hozAlign:"center", width:90},
|
344 |
{title:"Вебинары-досмотрел до конца", field:"b_fin", formatter:function(cell, formatterParams, onRendered){
|
345 |
var value = cell.getValue();
|
|
|
287 |
return link2 + `<img src="${imageUrlvk2}" alt="Image" style="width: 98px; height: 14px;">`;
|
288 |
}
|
289 |
}},
|
290 |
+
{title:"Телеграм", field:"chat_id", formatter: function(cell, formatterParams, onRendered) {
|
291 |
+
var chat_id = cell.getValue();
|
292 |
+
var imageUrltg1 = "https://i.ibb.co/BKB8R4C/2-2.png"; // Замените на URL первой картинки
|
293 |
+
var imageUrlng2 = "https://i.ibb.co/MPCGvQX/2-1.png"; // Замените на URL второй картинки
|
294 |
+
var linktg1 = `<a href="https://vk.com" target="_blank">`;
|
295 |
+
var linktg2 = `<a href="https://vk.com/id${vk_id}" target="_blank">`;
|
296 |
+
// Проверка условий
|
297 |
+
if (chat_id === "0" || chat_id === "") {
|
298 |
+
// Если равен "0" или пуст
|
299 |
+
return linktg1 + `<img src="${imageUrlvk1}" alt="Image" style="width: 98px; height: 14px;">`;
|
300 |
+
} else {
|
301 |
+
// Если не пуст и не равен "0"
|
302 |
+
return linktg2 + `<img src="${imageUrlvk2}" alt="Image" style="width: 98px; height: 14px;">`;
|
303 |
+
}
|
304 |
+
}},
|
305 |
{title:"Город", field:"b_city", width:95},
|
306 |
{title:"Email", field:"email", width:95},
|
307 |
{title:"Реплики", field:"b_mess", width:95, cellClick:function(e, cell){
|
|
|
348 |
var ad_url = cell.getValue();
|
349 |
return `<a href="${ad_url}" target="_blank">${ad_url}</a>`;
|
350 |
}},
|
351 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
{title:"Вебинары-присутствовал", field:"web_st", formatter:"star", formatterParams:{stars:7}, hozAlign:"center", width:90},
|
353 |
{title:"Вебинары-досмотрел до конца", field:"b_fin", formatter:function(cell, formatterParams, onRendered){
|
354 |
var value = cell.getValue();
|