Update bas_vk_tab.html
Browse files- bas_vk_tab.html +80 -35
bas_vk_tab.html
CHANGED
|
@@ -219,15 +219,82 @@
|
|
| 219 |
paginationSize: 50, // number of rows per page
|
| 220 |
selectable: true, // enable row selection
|
| 221 |
columns: [
|
| 222 |
-
|
| 223 |
-
{title:"Имя", field:"name", width:
|
| 224 |
{title:"WhatsApp", field:"phone", formatter: function(cell, formatterParams, onRendered) {
|
| 225 |
var phone = cell.getValue();
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
{title:"Статус покупки", field:"shop_st", formatter: function(cell, formatterParams, onRendered) {
|
| 232 |
var status = cell.getValue();
|
| 233 |
var color;
|
|
@@ -244,35 +311,13 @@
|
|
| 244 |
default:
|
| 245 |
color = 'gray';
|
| 246 |
}
|
| 247 |
-
return `<div style="width: 20px; height: 20px; background-color: ${color};"></div>`;
|
| 248 |
-
}},
|
| 249 |
-
{title:"Ссылка на пользователя в GC", field:"ad_url", formatter: function(cell, formatterParams, onRendered) {
|
| 250 |
-
var ad_url = cell.getValue();
|
| 251 |
-
return `<a href="${ad_url}" target="_blank">${ad_url}</a>`;
|
| 252 |
-
}},
|
| 253 |
-
{title:"Ссылка на VK", field:"vk_id", formatter: function(cell, formatterParams, onRendered) {
|
| 254 |
-
var vk_id = cell.getValue();
|
| 255 |
-
return `<a href="https://vk.com/id${vk_id}" target="_blank">${vk_id}</a>`;
|
| 256 |
-
}},
|
| 257 |
-
{title:"Ссылка на Tg", field:"chat_id", formatter: function(cell, formatterParams, onRendered) {
|
| 258 |
-
var chatId = cell.getValue();
|
| 259 |
-
if (chatId.startsWith('@')) {
|
| 260 |
-
chatId = chatId.substring(1); // Удаление символа @ в начале
|
| 261 |
-
}
|
| 262 |
-
return `<a href="https://t.me/${chatId}" target="_blank">${chatId}</a>`;
|
| 263 |
}},
|
| 264 |
-
{title:"
|
| 265 |
-
{title:"
|
| 266 |
-
{title:"
|
| 267 |
-
{title:"
|
| 268 |
-
{title:"
|
| 269 |
-
{title:"pr2", field:"pr2"},
|
| 270 |
-
{title:"pr3", field:"pr3"},
|
| 271 |
-
{title:"Канал трафика", field:"pr4"},
|
| 272 |
-
{title:"Дата", field:"pr5"},
|
| 273 |
-
{title:"Ключ PR", field:"key_pr"},
|
| 274 |
-
{title:"Канал", field:"canal"},
|
| 275 |
-
{title:"Дата", field:"data_t"}
|
| 276 |
],
|
| 277 |
});
|
| 278 |
var fieldEl = document.getElementById("filter-field");
|
|
|
|
| 219 |
paginationSize: 50, // number of rows per page
|
| 220 |
selectable: true, // enable row selection
|
| 221 |
columns: [
|
| 222 |
+
{title:"Номер в списке", field:"id"},
|
| 223 |
+
{title:"Имя", field:"name", width:100},
|
| 224 |
{title:"WhatsApp", field:"phone", formatter: function(cell, formatterParams, onRendered) {
|
| 225 |
var phone = cell.getValue();
|
| 226 |
+
var ws_stop = cell.getData().ws_stop;
|
| 227 |
+
var ws_st = cell.getData().ws_st;
|
| 228 |
+
var imageUrl1 = "https://i.ibb.co/YBvwFR6/whatsapp-2.png";
|
| 229 |
+
var imageUrl2 = "https://i.ibb.co/LZx71cM/1.png";
|
| 230 |
+
var imageUrl3 = "https://i.ibb.co/Cvn3QsK/whatsapp-3.png";
|
| 231 |
+
var link = `<a href="https://web.whatsapp.com/send?phone=${phone}" target="_blank">`;
|
| 232 |
+
if (ws_stop !== "1" && ws_st === "1") {
|
| 233 |
+
return link + `<img src="${imageUrl2}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
|
| 234 |
+
} else if (ws_stop === "1" && ws_st === "1") {
|
| 235 |
+
return link + `<img src="${imageUrl3}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
|
| 236 |
+
} else {
|
| 237 |
+
return link + `<img src="${imageUrl1}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
|
| 238 |
+
}
|
| 239 |
+
}},
|
| 240 |
+
{title:"ВКонтакте", field:"vk_id", formatter: function(cell, formatterParams, onRendered) {
|
| 241 |
+
var vk_id = cell.getValue();
|
| 242 |
+
var imageUrlvk1 = "https://i.ibb.co/BKB8R4C/2-2.png";
|
| 243 |
+
var imageUrlvk2 = "https://i.ibb.co/MPCGvQX/2-1.png";
|
| 244 |
+
var link1 = `<a href="https://vk.com" target="_blank">`;
|
| 245 |
+
var link2 = `<a href="https://vk.com/id${vk_id}" target="_blank">`;
|
| 246 |
+
if (vk_id === "0" || vk_id === "") {
|
| 247 |
+
return link1 + `<img src="${imageUrlvk1}" alt="Image" style="width: 98px; height: 14px;">`;
|
| 248 |
+
} else {
|
| 249 |
+
return link2 + `<img src="${imageUrlvk2}" alt="Image" style="width: 98px; height: 14px;">`;
|
| 250 |
+
}
|
| 251 |
+
}},
|
| 252 |
+
{title:"Телеграм", field:"chat_id", formatter: function(cell, formatterParams, onRendered) {
|
| 253 |
+
var chat_id = cell.getValue();
|
| 254 |
+
var imageUrltg1 = "https://i.ibb.co/3S4Wt7m/3-2.png";
|
| 255 |
+
var imageUrlntg2 = "https://i.ibb.co/rZrzQhb/3-1.png";
|
| 256 |
+
var linktg1 = `<a href="https://t.me" target="_blank">`;
|
| 257 |
+
var linktg2 = `<a href="https://t.me/${chat_id}" target="_blank">`;
|
| 258 |
+
if (chat_id === "0" || chat_id === "") {
|
| 259 |
+
return linktg1 + `<img src="${imageUrltg1}" alt="Image" style="width: 98px; height: 14px;">`;
|
| 260 |
+
} else {
|
| 261 |
+
return linktg2 + `<img src="${imageUrlntg2}" alt="Image" style="width: 98px; height: 14px;">`;
|
| 262 |
+
}
|
| 263 |
+
}},
|
| 264 |
+
{title:"GetCurse", field:"gc_url", formatter: function(cell, formatterParams, onRendered) {
|
| 265 |
+
var gc_url = cell.getValue();
|
| 266 |
+
var imageUrlvkgc1 = "https://i.ibb.co/F8825KY/1-2.png";
|
| 267 |
+
var imageUrlvkgc2 = "https://i.ibb.co/S3qwFKM/1-1.png";
|
| 268 |
+
var linkgc1 = `<a href="https://vk.com/getcourseru" target="_blank">`;
|
| 269 |
+
var linkgc2 = `<a href="${gc_url}" target="_blank">`;
|
| 270 |
+
if (gc_url === "0" || gc_url === "") {
|
| 271 |
+
return linkgc1 + `<img src="${imageUrlvkgc1}" alt="Image" style="width: 98px; height: 14px;">`;
|
| 272 |
+
} else {
|
| 273 |
+
return linkgc2 + `<img src="${imageUrlvkgc2}" alt="Image" style="width: 98px; height: 14px;">`;
|
| 274 |
+
}
|
| 275 |
+
}},
|
| 276 |
+
{title:"Город", field:"b_city", width:95},
|
| 277 |
+
{title:"Email", field:"email", width:95},
|
| 278 |
+
{title:"Реплики", field:"b_mess", width:95, cellClick:function(e, cell){
|
| 279 |
+
var data = cell.getData();
|
| 280 |
+
const notyf = new Notyf({
|
| 281 |
+
duration: 5000,
|
| 282 |
+
position: {
|
| 283 |
+
x: 'right',
|
| 284 |
+
y: 'top',
|
| 285 |
+
},
|
| 286 |
+
});
|
| 287 |
+
const message = `
|
| 288 |
+
Имя: ${data.name}\n
|
| 289 |
+
WhatsApp: ${data.phone}\n
|
| 290 |
+
Реплики: ${data.b_mess}
|
| 291 |
+
`;
|
| 292 |
+
notyf.open({
|
| 293 |
+
type: 'info',
|
| 294 |
+
message: message,
|
| 295 |
+
});
|
| 296 |
+
}},
|
| 297 |
+
{title:"Куратор", field:"curator", formatter: linkFormatter},
|
| 298 |
{title:"Статус покупки", field:"shop_st", formatter: function(cell, formatterParams, onRendered) {
|
| 299 |
var status = cell.getValue();
|
| 300 |
var color;
|
|
|
|
| 311 |
default:
|
| 312 |
color = 'gray';
|
| 313 |
}
|
| 314 |
+
return `<div style="width: 20px; height: 20px; background-color: ${color}; border-radius: 50%;"></div>`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
}},
|
| 316 |
+
{title:"Канал трафика", field:"pr4", width:95},
|
| 317 |
+
{title:"Дата", field:"pr5", width:95},
|
| 318 |
+
{title:"Ключ PR", field:"key_pr", width:95},
|
| 319 |
+
{title:"Канал", field:"canal", width:95},
|
| 320 |
+
{title:"Дата", field:"data_t", width:95},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
],
|
| 322 |
});
|
| 323 |
var fieldEl = document.getElementById("filter-field");
|