DmitrMakeev commited on
Commit
04ddb2d
1 Parent(s): b7c4b49

Update data_gc_tab.html

Browse files
Files changed (1) hide show
  1. data_gc_tab.html +22 -13
data_gc_tab.html CHANGED
@@ -265,19 +265,28 @@ button:hover, #filter-clear:hover, #download-json:hover, #take-for-yourself:hove
265
  {title:"Имя", field:"name", width:100},
266
 
267
 
268
- {title:"WhatsApp", field:"phone", formatter: function(cell, formatterParams, onRendered) {
269
- var phone = cell.getValue();
270
- var ws_stop = cell.getData().ws_stop;
271
- var imageUrl1 = "https://i.ibb.co/S3Kk5vM/1.png"; // Замените на URL первой картинки
272
- var imageUrl2 = "https://i.ibb.co/Ph3SB0m/2.png"; // Замените на URL второй картинки
273
- var link = `<a href="https://web.whatsapp.com/send?phone=${phone}" target="_blank">`;
274
-
275
- if (ws_stop === "1") {
276
- return link + `<img src="${imageUrl1}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
277
- } else {
278
- return link + `<img src="${imageUrl2}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
279
- }
280
- }},
 
 
 
 
 
 
 
 
 
281
 
282
 
283
  {title:"Город", field:"b_city", width:110},
 
265
  {title:"Имя", field:"name", width:100},
266
 
267
 
268
+ {title:"WhatsApp", field:"phone", formatter: function(cell, formatterParams, onRendered) {
269
+ var phone = cell.getValue();
270
+ var ws_stop = cell.getData().ws_stop;
271
+ var ws_st = cell.getData().ws_st;
272
+ var imageUrl1 = "https://i.ibb.co/b5sY26p/whatsapp-1.png"; // Замените на URL первой картинки
273
+ var imageUrl2 = "https://i.ibb.co/B4zFhJv/whatsapp-2.png"; // Замените на URL второй картинки
274
+ var imageUrl3 = "https://i.ibb.co/Cvn3QsK/whatsapp-3.png"; // Замените на URL второй картинки
275
+ var link = `<a href="https://web.whatsapp.com/send?phone=${phone}" target="_blank">`;
276
+ // Проверка условий
277
+ if (ws_stop !== 1 && ws_st === 1) {
278
+ console.log("Первая переменная не равна единице, вторая равна единице");
279
+ return link + `<img src="${imageUrl2}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
280
+
281
+ } else if (ws_stop === 1 && ws_st == 1) {
282
+ console.log("Обе переменные равны единице");
283
+ return link + `<img src="${imageUrl1}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
284
+
285
+ } else {
286
+ console.log("Остальные случаи");
287
+ return link + `<img src="${imageUrl3}" alt="WhatsApp" style="width: 98px; height: 14px;">`;
288
+ }
289
+ }},
290
 
291
 
292
  {title:"Город", field:"b_city", width:110},