DmitrMakeev commited on
Commit
74199b2
1 Parent(s): d387255

Update bas_vk_tab.html

Browse files
Files changed (1) hide show
  1. bas_vk_tab.html +97 -0
bas_vk_tab.html CHANGED
@@ -254,6 +254,103 @@ button:hover, #filter-clear:hover, #download-json:hover, #take-for-yourself:hove
254
  {title:"Имя", field:"name", width:100},
255
  {title:"Город", field:"b_city", width:95},
256
  {title:"Email", field:"email", width:95},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  {title:"Реплики", field:"b_mess", width:95, cellClick:function(e, cell){
258
  var data = cell.getData();
259
  const notyf = new Notyf({
 
254
  {title:"Имя", field:"name", width:100},
255
  {title:"Город", field:"b_city", width:95},
256
  {title:"Email", field:"email", width:95},
257
+
258
+
259
+
260
+
261
+ {title:"WhatsApp", field:"phone", formatter: function(cell, formatterParams, onRendered) {
262
+ var phone = cell.getValue();
263
+ var ws_stop = cell.getData().ws_stop;
264
+ var ws_st = cell.getData().ws_st;
265
+ var imageUrl1 = "https://i.ibb.co/YBvwFR6/whatsapp-2.png"; // Замените на URL первой картинки
266
+ var imageUrl2 = "https://i.ibb.co/LZx71cM/1.png"; // Замените на URL второй картинки
267
+ var imageUrl3 = "https://i.ibb.co/Cvn3QsK/whatsapp-3.png"; // Замените на URL второй картинки
268
+ var link = `<a href="https://web.whatsapp.com/send?phone=${phone}" target="_blank">`;
269
+ // Проверка условий
270
+ if (ws_stop !== "1" && ws_st === "1") {
271
+ console.log("Первая переменная не равна единице, вторая равна единице");
272
+ return link + `<img src="${imageUrl2}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
273
+
274
+ } else if (ws_stop === "1" && ws_st === "1") {
275
+ console.log("Обе переменные равны единице");
276
+ return link + `<img src="${imageUrl3}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
277
+
278
+ } else {
279
+ console.log("Остальные случаи");
280
+ return link + `<img src="${imageUrl1}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
281
+ }
282
+ }},
283
+
284
+
285
+
286
+
287
+
288
+ {title:"ВКонтакте", field:"vk_id", formatter: function(cell, formatterParams, onRendered) {
289
+ var vk_id = cell.getValue();
290
+ var imageUrlvk1 = "https://i.ibb.co/BKB8R4C/2-2.png"; // Замените на URL первой картинки
291
+ var imageUrlvk2 = "https://i.ibb.co/MPCGvQX/2-1.png"; // Замените на URL второй картинки
292
+
293
+ var link1 = `<a href="https://vk.com" target="_blank">`;
294
+ var link2 = `<a href="https://vk.com/id${vk_id}" target="_blank">`;
295
+ // Проверка условий
296
+ if (vk_id === "0" || vk_id === "") {
297
+ // Если vk_id равен "0" или пуст
298
+ return link1 + `<img src="${imageUrlvk1}" alt="Image" style="width: 98px; height: 14px;">`;
299
+ } else {
300
+ // Если vk_id не пуст и не равен "0"
301
+ return link2 + `<img src="${imageUrlvk2}" alt="Image" style="width: 98px; height: 14px;">`;
302
+ }
303
+ }},
304
+
305
+
306
+
307
+
308
+ {title:"Телеграм", field:"chat_id", formatter: function(cell, formatterParams, onRendered) {
309
+ var chat_id = cell.getValue();
310
+ var imageUrltg1 = "https://i.ibb.co/3S4Wt7m/3-2.png";
311
+ var imageUrlntg2 = "https://i.ibb.co/rZrzQhb/3-1.png";
312
+ var linktg1 = `<a href="https://t.me" target="_blank">`;
313
+ var linktg2 = `<a href="https://t.me/${chat_id}" target="_blank">`;
314
+ if (chat_id === "0" || chat_id === "") {
315
+ return linktg1 + `<img src="${imageUrltg1}" alt="Image" style="width: 98px; height: 14px;">`;
316
+ } else {
317
+ return linktg2 + `<img src="${imageUrlntg2}" alt="Image" style="width: 98px; height: 14px;">`;
318
+ }
319
+ }},
320
+ {title:"GetCurse", field:"gc_url", formatter: function(cell, formatterParams, onRendered) {
321
+ var gc_url = cell.getValue();
322
+ var imageUrlvkgc1 = "https://i.ibb.co/F8825KY/1-2.png";
323
+ var imageUrlvkgc2 = "https://i.ibb.co/S3qwFKM/1-1.png";
324
+ var linkgc1 = `<a href="https://vk.com/getcourseru" target="_blank">`;
325
+ var linkgc2 = `<a href="${gc_url}" target="_blank">`;
326
+ if (gc_url === "0" || gc_url === "") {
327
+ return linkgc1 + `<img src="${imageUrlvkgc1}" alt="Image" style="width: 98px; height: 14px;">`;
328
+ } else {
329
+ return linkgc2 + `<img src="${imageUrlvkgc2}" alt="Image" style="width: 98px; height: 14px;">`;
330
+ }
331
+ }},
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
  {title:"Реплики", field:"b_mess", width:95, cellClick:function(e, cell){
355
  var data = cell.getData();
356
  const notyf = new Notyf({