DmitrMakeev
commited on
Commit
•
bebb545
1
Parent(s):
71b4092
Update data_gc_tab.html
Browse files- data_gc_tab.html +248 -113
data_gc_tab.html
CHANGED
@@ -1,3 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<body>
|
2 |
<div id="header">
|
3 |
<h1>WhatsCRM - Автопилот + Tilda + Бизон 365 + GetCurse</h1>
|
@@ -40,33 +233,6 @@
|
|
40 |
|
41 |
<input id="filter-value" type="text" placeholder="Значение фильтра">
|
42 |
|
43 |
-
<select id="filter-field2">
|
44 |
-
<option></option>
|
45 |
-
<option value="id">Номер в списке</option>
|
46 |
-
<option value="name">Имя</option>
|
47 |
-
<option value="phone">WhatsApp</option>
|
48 |
-
<option value="email">Email</option>
|
49 |
-
<option value="b_mess">Реплики</option>
|
50 |
-
<option value="curator">Куратор</option>
|
51 |
-
<option value="shop_st">Статус покупки</option>
|
52 |
-
<option value="ad_url">Ссылка на пользователя в GC</option>
|
53 |
-
<option value="vk_id">Ссылка на VK</option>
|
54 |
-
<option value="chat_id">Ссылка на Tg</option>
|
55 |
-
<option value="ws_stop">Стутус подписки</option>
|
56 |
-
<option value="web_st">Вебинары</option>
|
57 |
-
<option value="fin_prog">Прогрес по воронке</option>
|
58 |
-
<option value="pr1">pr1</option>
|
59 |
-
<option value="pr2">pr2</option>
|
60 |
-
<option value="pr3">pr3</option>
|
61 |
-
<option value="pr4">Канал трафика</option>
|
62 |
-
<option value="pr5">Дата</option>
|
63 |
-
<option value="key_pr">Ключ PR</option>
|
64 |
-
<option value="canal">Канал</option>
|
65 |
-
<option value="data_t">Дата</option>
|
66 |
-
</select>
|
67 |
-
|
68 |
-
<input id="filter-value2" type="text" placeholder="Значение фильтра 2">
|
69 |
-
|
70 |
<button id="filter-clear">Очистить фильтр</button>
|
71 |
|
72 |
<button id="download-json">Рассылка по выбранным</button>
|
@@ -74,10 +240,13 @@
|
|
74 |
</div>
|
75 |
<div id="example-table"></div>
|
76 |
|
|
|
|
|
|
|
|
|
77 |
<script>
|
78 |
-
vkBridge.send('VKWebAppInit');
|
79 |
document.addEventListener('DOMContentLoaded', function() {
|
80 |
-
fetch('https://
|
81 |
.then(response => response.json())
|
82 |
.then(data => {
|
83 |
console.log('Data received:', data); // Логирование данных
|
@@ -97,50 +266,31 @@
|
|
97 |
columns: [
|
98 |
{title:"Номер в списке", field:"id"},
|
99 |
{title:"Имя", field:"name", width:100},
|
100 |
-
|
101 |
-
|
102 |
-
{
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
var
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
|
126 |
-
{title:"Город", field:"b_city", width:95},
|
127 |
-
{title:"Email", field:"email", width:95},
|
128 |
-
{title:"Реплики", field:"b_mess", width:95, cellClick:function(e, cell){
|
129 |
-
var data = cell.getData();
|
130 |
-
Swal.fire({
|
131 |
-
title: 'Детали пользователя',
|
132 |
-
html: `
|
133 |
-
<strong>Имя:</strong> ${data.name}<br>
|
134 |
-
<strong>WhatsApp:</strong> <a href="https://web.whatsapp.com/send?phone=${data.phone}" target="_blank">${data.phone}</a><br>
|
135 |
-
<strong>Реплики:</strong> ${data.b_mess}`,
|
136 |
-
icon: 'success',
|
137 |
-
confirmButtonText: 'Закрыть',
|
138 |
-
confirmButtonColor: '#4CAF50',
|
139 |
-
customClass: {
|
140 |
-
confirmButton: 'button is-success',
|
141 |
-
title: 'title-custom',
|
142 |
-
content: 'content-custom'}});}},
|
143 |
-
|
144 |
{title:"Куратор", field:"curator", formatter: linkFormatter},
|
145 |
{title:"Статус покупки", field:"shop_st", formatter: function(cell, formatterParams, onRendered) {
|
146 |
var status = cell.getValue();
|
@@ -175,20 +325,21 @@ return link + `<img src="${imageUrl3}" alt="WhatsApp" style="width: 98px; height
|
|
175 |
}
|
176 |
return `<a href="https://t.me/${chatId}" target="_blank">${chatId}</a>`;
|
177 |
}},
|
178 |
-
|
179 |
-
{title:"
|
180 |
-
{title:"
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
|
|
190 |
|
191 |
-
{title:"Прогрес по воронке", field:"fin_prog", formatter:"progress", formatterParams:{color:["#
|
192 |
{title:"pr1", field:"pr1"},
|
193 |
{title:"pr2", field:"pr2"},
|
194 |
{title:"pr3", field:"pr3"},
|
@@ -199,61 +350,45 @@ return link + `<img src="${imageUrl3}" alt="WhatsApp" style="width: 98px; height
|
|
199 |
{title:"Дата", field:"data_t", width:150}
|
200 |
],
|
201 |
});
|
202 |
-
|
203 |
-
|
204 |
var fieldEl = document.getElementById("filter-field");
|
205 |
var typeEl = document.getElementById("filter-type");
|
206 |
var valueEl = document.getElementById("filter-value");
|
207 |
-
var fieldEl2 = document.getElementById("filter-field2");
|
208 |
-
var valueEl2 = document.getElementById("filter-value2");
|
209 |
-
|
210 |
function updateFilter() {
|
211 |
-
var
|
212 |
-
var
|
213 |
-
|
214 |
-
|
215 |
-
var filterVal2 = fieldEl2.value;
|
216 |
-
var valueVal2 = valueEl2.value;
|
217 |
-
|
218 |
-
if (filterVal1 && filterVal2) {
|
219 |
-
table.setFilter([
|
220 |
-
{ field: filterVal1, type: typeVal1, value: valueVal1 },
|
221 |
-
{ field: filterVal2, type: "=", value: valueVal2 }
|
222 |
-
]);
|
223 |
}
|
224 |
}
|
225 |
-
|
226 |
document.getElementById("filter-field").addEventListener("change", updateFilter);
|
227 |
document.getElementById("filter-type").addEventListener("change", updateFilter);
|
228 |
document.getElementById("filter-value").addEventListener("keyup", updateFilter);
|
229 |
-
document.getElementById("filter-field2").addEventListener("change", updateFilter);
|
230 |
-
document.getElementById("filter-value2").addEventListener("keyup", updateFilter);
|
231 |
-
|
232 |
document.getElementById("filter-clear").addEventListener("click", function() {
|
233 |
fieldEl.value = "";
|
234 |
typeEl.value = "=";
|
235 |
valueEl.value = "";
|
236 |
-
fieldEl2.value = "";
|
237 |
-
valueEl2.value = "";
|
238 |
table.clearFilter();
|
239 |
});
|
240 |
-
|
241 |
function handleDownloadJson() {
|
242 |
var tableData = table.getData("active");
|
243 |
var jsonData = JSON.stringify(tableData, null, 2);
|
244 |
console.log("Данные для рассылки:", jsonData);
|
245 |
}
|
246 |
-
|
247 |
function handleTakeForYourself() {
|
248 |
var tableData = table.getData("active");
|
249 |
var jsonData = JSON.stringify(tableData, null, 2);
|
250 |
console.log("Данные для себя:", jsonData);
|
251 |
}
|
252 |
-
|
253 |
document.getElementById("download-json").addEventListener("click", handleDownloadJson);
|
254 |
document.getElementById("take-for-yourself").addEventListener("click", handleTakeForYourself);
|
255 |
})
|
256 |
.catch(error => console.error('Error fetching data:', error));
|
257 |
});
|
258 |
</script>
|
259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="ru">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>WhatsCRM - Автопилот + Tilda + Бизон 365 + GetCurse</title>
|
7 |
+
|
8 |
+
|
9 |
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
10 |
+
<script src="https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js"></script>
|
11 |
+
<script type="text/javascript" src="https://vk.com/js/api/openapi.js?169"></script>
|
12 |
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
13 |
+
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
19 |
+
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
<link href="https://unpkg.com/[email protected]/dist/css/tabulator.min.css" rel="stylesheet">
|
30 |
+
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/js/tabulator.min.js"></script>
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
35 |
+
<style>
|
36 |
+
body {
|
37 |
+
font-family: Arial, sans-serif;
|
38 |
+
text-align: center;
|
39 |
+
background-color: #f0f0f0;
|
40 |
+
margin: 0;
|
41 |
+
padding: 0;
|
42 |
+
}
|
43 |
+
h1 {
|
44 |
+
background-color: #4CAF50;
|
45 |
+
color: white;
|
46 |
+
padding: 20px;
|
47 |
+
margin: 0;
|
48 |
+
border-bottom: 2px solid #388E3C;
|
49 |
+
font-size: 28px;
|
50 |
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
51 |
+
}
|
52 |
+
button[type="submit"] {
|
53 |
+
color: white;
|
54 |
+
background-color: #4CAF50;
|
55 |
+
border: none;
|
56 |
+
cursor: pointer;
|
57 |
+
padding: 10px 20px;
|
58 |
+
font-size: 16px;
|
59 |
+
border-radius: 5px;
|
60 |
+
margin-top: 20px;
|
61 |
+
transition: background-color 0.3s ease;
|
62 |
+
}
|
63 |
+
button[type="submit"]:hover {
|
64 |
+
background-color: #388E3C;
|
65 |
+
}
|
66 |
+
#mediaContainer {
|
67 |
+
margin-top: 20px;
|
68 |
+
display: flex;
|
69 |
+
justify-content: center;
|
70 |
+
align-items: center;
|
71 |
+
flex-direction: column;
|
72 |
+
max-width: 100%;
|
73 |
+
height: auto;
|
74 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
75 |
+
border-radius: 10px;
|
76 |
+
padding: 20px;
|
77 |
+
background-color: white;
|
78 |
+
}
|
79 |
+
#mediaContainer img, #mediaContainer video {
|
80 |
+
max-width: 100%;
|
81 |
+
height: auto;
|
82 |
+
object-fit: contain;
|
83 |
+
border-radius: 10px;
|
84 |
+
}
|
85 |
+
#imageUrl {
|
86 |
+
margin-top: 20px;
|
87 |
+
font-size: 16px;
|
88 |
+
color: #333;
|
89 |
+
cursor: pointer;
|
90 |
+
text-decoration: underline;
|
91 |
+
transition: color 0.3s ease;
|
92 |
+
}
|
93 |
+
#imageUrl:hover {
|
94 |
+
color: #4CAF50;
|
95 |
+
}
|
96 |
+
#progressBarContainer {
|
97 |
+
width: 80%;
|
98 |
+
margin: 20px auto;
|
99 |
+
background-color: #ddd;
|
100 |
+
border-radius: 13px;
|
101 |
+
padding: 3px;
|
102 |
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
|
103 |
+
}
|
104 |
+
#progressBar {
|
105 |
+
width: 0%;
|
106 |
+
height: 20px;
|
107 |
+
background-color: #4CAF50;
|
108 |
+
border-radius: 10px;
|
109 |
+
text-align: center;
|
110 |
+
line-height: 20px;
|
111 |
+
color: white;
|
112 |
+
transition: width 0.3s ease;
|
113 |
+
}
|
114 |
+
#filter-field, #filter-type, #filter-value, #filter-clear , #download-json{
|
115 |
+
padding: 10px;
|
116 |
+
font-size: 16px;
|
117 |
+
margin: 5px;
|
118 |
+
}
|
119 |
+
#filter-value {
|
120 |
+
width: 200px;
|
121 |
+
}
|
122 |
+
#filter-clear {
|
123 |
+
padding: 10px 20px;
|
124 |
+
}
|
125 |
+
#filter-field, #filter-type, #filter-value, #filter-clear, #download-json {
|
126 |
+
padding: 10px;
|
127 |
+
font-size: 16px;
|
128 |
+
margin: 5px;
|
129 |
+
border-radius: 5px;
|
130 |
+
border: 1px solid #ccc;
|
131 |
+
}
|
132 |
+
#filter-value {
|
133 |
+
width: 200px;
|
134 |
+
background-color: #f0f0f0;
|
135 |
+
}
|
136 |
+
#filter-clear {
|
137 |
+
padding: 10px 20px;
|
138 |
+
background-color: #4CAF50;
|
139 |
+
color: white;
|
140 |
+
border: none;
|
141 |
+
cursor: pointer;
|
142 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
143 |
+
transition: background-color 0.3s ease;
|
144 |
+
}
|
145 |
+
#filter-clear:hover {
|
146 |
+
background-color: #388E3C;
|
147 |
+
}
|
148 |
+
#download-json {
|
149 |
+
padding: 10px 20px;
|
150 |
+
background-color: #4CAF50;
|
151 |
+
color: white;
|
152 |
+
border: none;
|
153 |
+
cursor: pointer;
|
154 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
155 |
+
transition: background-color 0.3s ease;
|
156 |
+
}
|
157 |
+
#download-json:hover {
|
158 |
+
background-color: #388E3C;
|
159 |
+
}
|
160 |
+
#take-for-yourself {
|
161 |
+
padding: 10px 20px;
|
162 |
+
font-size: 16px;
|
163 |
+
margin: 5px;
|
164 |
+
border-radius: 5px;
|
165 |
+
border: 1px solid #ccc;
|
166 |
+
background-color: #4CAF50;
|
167 |
+
color: white;
|
168 |
+
cursor: pointer;
|
169 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
170 |
+
transition: background-color 0.3s ease;
|
171 |
+
}
|
172 |
+
#take-for-yourself:hover {
|
173 |
+
background-color: #388E3C;
|
174 |
+
}
|
175 |
+
</style>
|
176 |
+
|
177 |
+
<style>
|
178 |
+
.swal-button-custom {
|
179 |
+
background-color: #4CAF50;
|
180 |
+
font-size: 16px;
|
181 |
+
padding: 10px 20px;
|
182 |
+
}
|
183 |
+
.swal-title-custom {
|
184 |
+
font-size: 24px;
|
185 |
+
color: #333;
|
186 |
+
}
|
187 |
+
.swal-content-custom {
|
188 |
+
font-size: 16px;
|
189 |
+
color: #666;
|
190 |
+
}
|
191 |
+
</style>
|
192 |
+
</head>
|
193 |
+
|
194 |
<body>
|
195 |
<div id="header">
|
196 |
<h1>WhatsCRM - Автопилот + Tilda + Бизон 365 + GetCurse</h1>
|
|
|
233 |
|
234 |
<input id="filter-value" type="text" placeholder="Значение фильтра">
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
<button id="filter-clear">Очистить фильтр</button>
|
237 |
|
238 |
<button id="download-json">Рассылка по выбранным</button>
|
|
|
240 |
</div>
|
241 |
<div id="example-table"></div>
|
242 |
|
243 |
+
|
244 |
+
|
245 |
+
|
246 |
+
|
247 |
<script>
|
|
|
248 |
document.addEventListener('DOMContentLoaded', function() {
|
249 |
+
fetch('https://dmtuit-gcapirabiz.hf.space/data_gc_tab_out?api_sys=fasSd345D')
|
250 |
.then(response => response.json())
|
251 |
.then(data => {
|
252 |
console.log('Data received:', data); // Логирование данных
|
|
|
266 |
columns: [
|
267 |
{title:"Номер в списке", field:"id"},
|
268 |
{title:"Имя", field:"name", width:100},
|
269 |
+
{title:"WhatsApp", field:"phone", formatter: function(cell, formatterParams, onRendered) {
|
270 |
+
var phone = cell.getValue();
|
271 |
+
return `<a href="https://web.whatsapp.com/send?phone=${phone}" target="_blank">${phone}</a>`;
|
272 |
+
}, width:120},
|
273 |
+
{title:"Город", field:"b_city", width:110},
|
274 |
+
{title:"Email", field:"email", width:110},
|
275 |
+
{title:"Реплики", field:"b_mess", width:95, cellClick:function(e, cell){
|
276 |
+
var data = cell.getData();
|
277 |
+
Swal.fire({
|
278 |
+
title: 'Детали пользователя',
|
279 |
+
html: `
|
280 |
+
<strong>Имя:</strong> ${data.name}<br>
|
281 |
+
<strong>WhatsApp:</strong> <a href="https://web.whatsapp.com/send?phone=${data.phone}" target="_blank">${data.phone}</a><br>
|
282 |
+
<strong>Реплики:</strong> ${data.b_mess}
|
283 |
+
`,
|
284 |
+
icon: 'success',
|
285 |
+
confirmButtonText: 'Закрыть',
|
286 |
+
confirmButtonColor: '#4CAF50',
|
287 |
+
customClass: {
|
288 |
+
confirmButton: 'button is-success',
|
289 |
+
title: 'title-custom',
|
290 |
+
content: 'content-custom'
|
291 |
+
}
|
292 |
+
});
|
293 |
+
}},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
{title:"Куратор", field:"curator", formatter: linkFormatter},
|
295 |
{title:"Статус покупки", field:"shop_st", formatter: function(cell, formatterParams, onRendered) {
|
296 |
var status = cell.getValue();
|
|
|
325 |
}
|
326 |
return `<a href="https://t.me/${chatId}" target="_blank">${chatId}</a>`;
|
327 |
}},
|
328 |
+
{title:"Статус WhatsApp", field:"ws_st"},
|
329 |
+
{title:"Стутус подписки", field:"ws_stop"},
|
330 |
+
{title:"Вебинары-присутствовал", field:"web_st", formatter:"star", formatterParams:{stars:7}, hozAlign:"center", width:120},
|
331 |
+
{title:"Вебинары-досмотрел до конца", field:"b_fin", formatter:function(cell, formatterParams, onRendered){
|
332 |
+
var value = cell.getValue();
|
333 |
+
var icon;
|
334 |
+
if (value === 'True') {
|
335 |
+
icon = ' <img src="https://mrbeliever-background-remover.hf.space/--replicas/dv2tz/file=/tmp/gradio/2da6c3c9a4c2ee2ce9460af207d56dbade620115/image.png" width="30" height="14" />'; // Иконка для активного статуса
|
336 |
+
} else {
|
337 |
+
icon = ''; // Пустая строка для неактивного статуса или если значение не определено
|
338 |
+
}
|
339 |
+
return icon;
|
340 |
+
}, width:100},
|
341 |
|
342 |
+
{title:"Прогрес по воронке", field:"fin_prog", formatter:"progress", formatterParams:{color:["#00dd00", "orange", "rgb(255,0,0)"]}, sorter:"number", width:100},
|
343 |
{title:"pr1", field:"pr1"},
|
344 |
{title:"pr2", field:"pr2"},
|
345 |
{title:"pr3", field:"pr3"},
|
|
|
350 |
{title:"Дата", field:"data_t", width:150}
|
351 |
],
|
352 |
});
|
|
|
|
|
353 |
var fieldEl = document.getElementById("filter-field");
|
354 |
var typeEl = document.getElementById("filter-type");
|
355 |
var valueEl = document.getElementById("filter-value");
|
|
|
|
|
|
|
356 |
function updateFilter() {
|
357 |
+
var filterVal = fieldEl.options[fieldEl.selectedIndex].value;
|
358 |
+
var typeVal = typeEl.options[typeEl.selectedIndex].value;
|
359 |
+
if (filterVal) {
|
360 |
+
table.setFilter(filterVal, typeVal, valueEl.value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
}
|
362 |
}
|
|
|
363 |
document.getElementById("filter-field").addEventListener("change", updateFilter);
|
364 |
document.getElementById("filter-type").addEventListener("change", updateFilter);
|
365 |
document.getElementById("filter-value").addEventListener("keyup", updateFilter);
|
|
|
|
|
|
|
366 |
document.getElementById("filter-clear").addEventListener("click", function() {
|
367 |
fieldEl.value = "";
|
368 |
typeEl.value = "=";
|
369 |
valueEl.value = "";
|
|
|
|
|
370 |
table.clearFilter();
|
371 |
});
|
|
|
372 |
function handleDownloadJson() {
|
373 |
var tableData = table.getData("active");
|
374 |
var jsonData = JSON.stringify(tableData, null, 2);
|
375 |
console.log("Данные для рассылки:", jsonData);
|
376 |
}
|
|
|
377 |
function handleTakeForYourself() {
|
378 |
var tableData = table.getData("active");
|
379 |
var jsonData = JSON.stringify(tableData, null, 2);
|
380 |
console.log("Данные для себя:", jsonData);
|
381 |
}
|
|
|
382 |
document.getElementById("download-json").addEventListener("click", handleDownloadJson);
|
383 |
document.getElementById("take-for-yourself").addEventListener("click", handleTakeForYourself);
|
384 |
})
|
385 |
.catch(error => console.error('Error fetching data:', error));
|
386 |
});
|
387 |
</script>
|
388 |
+
|
389 |
+
|
390 |
+
|
391 |
+
|
392 |
+
</body>
|
393 |
+
|
394 |
+
</html>
|