Update data_gc_tab.html
Browse files- data_gc_tab.html +88 -86
data_gc_tab.html
CHANGED
@@ -146,30 +146,31 @@
|
|
146 |
<h1>GetCurse - WhatsCRM</h1>
|
147 |
</div>
|
148 |
<div>
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
173 |
|
174 |
<select id="filter-type">
|
175 |
<option value="=">=</option>
|
@@ -201,68 +202,69 @@
|
|
201 |
var curatorLink = cell.getData().curator_link;
|
202 |
return `<a href="${curatorLink}" target="_blank">${curator}</a>`;
|
203 |
};
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
|
|
266 |
// Define variables for input elements
|
267 |
var fieldEl = document.getElementById("filter-field");
|
268 |
var typeEl = document.getElementById("filter-type");
|
|
|
146 |
<h1>GetCurse - WhatsCRM</h1>
|
147 |
</div>
|
148 |
<div>
|
149 |
+
<select id="filter-field">
|
150 |
+
<option></option>
|
151 |
+
<option value="id">Номер в списке</option>
|
152 |
+
<option value="name">Имя</option>
|
153 |
+
<option value="phone">Телефон</option>
|
154 |
+
<option value="email">Email</option>
|
155 |
+
<option value="curator">Куратор</option>
|
156 |
+
<option value="shop_statys_full">Статус покупки</option>
|
157 |
+
<option value="ad_url">Ссылка на пользователя в GC</option>
|
158 |
+
<option value="vk_id">Ссылка на VK</option>
|
159 |
+
<option value="chat_id">Ссылка на Tg</option>
|
160 |
+
<option value="ws_statys">Статус WhatsApp</option>
|
161 |
+
<option value="ws_stop">Стутус подписки</option>
|
162 |
+
<option value="web_statys">Вебинары</option>
|
163 |
+
<option value="fin_progress">Прогрес по воронке</option>
|
164 |
+
<option value="pr1">pr1</option>
|
165 |
+
<option value="pr2">pr2</option>
|
166 |
+
<option value="pr3">pr3</option>
|
167 |
+
<option value="pr4">pr4</option>
|
168 |
+
<option value="pr5">pr5</option>
|
169 |
+
<option value="key_pr">Ключ предлож.</option>
|
170 |
+
<option value="canal">Канал</option>
|
171 |
+
<option value="data_t">Дата</option>
|
172 |
+
<option value="n_con">n_con</option> <!-- Добавлено новое поле -->
|
173 |
+
</select>
|
174 |
|
175 |
<select id="filter-type">
|
176 |
<option value="=">=</option>
|
|
|
202 |
var curatorLink = cell.getData().curator_link;
|
203 |
return `<a href="${curatorLink}" target="_blank">${curator}</a>`;
|
204 |
};
|
205 |
+
var table = new Tabulator("#example-table", {
|
206 |
+
data: data, // set table data
|
207 |
+
layout: "fitColumns", // fit columns to width of table
|
208 |
+
pagination: "local", // enable local pagination
|
209 |
+
paginationSize: 50, // number of rows per page
|
210 |
+
columns: [
|
211 |
+
{title:"Номер в списке", field:"id"},
|
212 |
+
{title:"Имя", field:"name"},
|
213 |
+
{title:"Телефон", field:"phone"},
|
214 |
+
{title:"Email", field:"email"},
|
215 |
+
{title:"Куратор", field:"curator", formatter: linkFormatter},
|
216 |
+
{title:"Статус покупки", field:"shop_statys_full", formatter: function(cell, formatterParams, onRendered) {
|
217 |
+
var status = cell.getValue();
|
218 |
+
var color;
|
219 |
+
switch (status) {
|
220 |
+
case 'green':
|
221 |
+
color = 'green';
|
222 |
+
break;
|
223 |
+
case 'red':
|
224 |
+
color = 'red';
|
225 |
+
break;
|
226 |
+
case 'yellow':
|
227 |
+
color = 'yellow';
|
228 |
+
break;
|
229 |
+
default:
|
230 |
+
color = 'gray';
|
231 |
+
}
|
232 |
+
return `<div style="width: 20px; height: 20px; background-color: ${color};"></div>`;
|
233 |
+
}},
|
234 |
+
{title:"Ссылка на пользователя в GC", field:"ad_url", formatter: function(cell, formatterParams, onRendered) {
|
235 |
+
var ad_url = cell.getValue();
|
236 |
+
return `<a href="${ad_url}" target="_blank">${ad_url}</a>`;
|
237 |
+
}},
|
238 |
+
{title:"Ссылка на VK", field:"vk_id", formatter: function(cell, formatterParams, onRendered) {
|
239 |
+
var vk_id = cell.getValue();
|
240 |
+
return `<a href="https://vk.com/id${vk_id}" target="_blank">${vk_id}</a>`;
|
241 |
+
}},
|
242 |
+
{title:"Ссылка на Tg", field:"chat_id", formatter: function(cell, formatterParams, onRendered) {
|
243 |
+
var chatId = cell.getValue();
|
244 |
+
if (chatId.startsWith('@')) {
|
245 |
+
chatId = chatId.substring(1); // Удаление символа @ в начале
|
246 |
+
}
|
247 |
+
return `<a href="https://t.me/${chatId}" target="_blank">${chatId}</a>`;
|
248 |
+
}},
|
249 |
+
{title:"Ссылка на WhatsApp", field:"phone", formatter: function(cell, formatterParams, onRendered) {
|
250 |
+
var phone = cell.getValue();
|
251 |
+
return `<a href="https://web.whatsapp.com/send?phone=${phone}" target="_blank">${phone}</a>`;
|
252 |
+
}},
|
253 |
+
{title:"Статус WhatsApp", field:"ws_statys"},
|
254 |
+
{title:"Стутус подписки", field:"ws_stop"},
|
255 |
+
{title:"Вебинары", field:"web_statys", formatter:"star", formatterParams:{stars:7}, hozAlign:"center", width:120},
|
256 |
+
{title:"Прогрес по воронке", field:"fin_progress", formatter:"progress", formatterParams:{color:["#00dd00", "orange", "rgb(255,0,0)"]}, sorter:"number", width:100},
|
257 |
+
{title:"pr1", field:"pr1"},
|
258 |
+
{title:"pr2", field:"pr2"},
|
259 |
+
{title:"pr3", field:"pr3"},
|
260 |
+
{title:"pr4", field:"pr4"},
|
261 |
+
{title:"pr5", field:"pr5"},
|
262 |
+
{title:"Ключ предлож.", field:"key_pr"},
|
263 |
+
{title:"Канал", field:"canal"},
|
264 |
+
{title:"Дата", field:"data_t"},
|
265 |
+
{title:"n_con", field:"n_con"} // Добавлено новое поле
|
266 |
+
],
|
267 |
+
});
|
268 |
// Define variables for input elements
|
269 |
var fieldEl = document.getElementById("filter-field");
|
270 |
var typeEl = document.getElementById("filter-type");
|