Update data_gc_tab.html
Browse files- data_gc_tab.html +33 -98
data_gc_tab.html
CHANGED
@@ -53,117 +53,52 @@
|
|
53 |
#mediaContainer img, #mediaContainer video {
|
54 |
max-width: 100%;
|
55 |
height: auto;
|
56 |
-
|
57 |
-
border-radius:
|
58 |
}
|
59 |
-
#
|
60 |
-
margin-top: 20px;
|
61 |
-
font-size: 16px;
|
62 |
color: #333;
|
63 |
-
|
64 |
-
text-decoration: underline;
|
65 |
-
transition: color 0.3s ease;
|
66 |
-
}
|
67 |
-
#imageUrl:hover {
|
68 |
-
color: #4CAF50;
|
69 |
-
}
|
70 |
-
#progressBarContainer {
|
71 |
-
width: 80%;
|
72 |
-
margin: 20px auto;
|
73 |
-
background-color: #ddd;
|
74 |
-
border-radius: 13px;
|
75 |
-
padding: 3px;
|
76 |
-
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
|
77 |
-
}
|
78 |
-
#progressBar {
|
79 |
-
width: 0%;
|
80 |
-
height: 20px;
|
81 |
-
background-color: #4CAF50;
|
82 |
-
border-radius: 10px;
|
83 |
text-align: center;
|
84 |
-
|
85 |
-
|
86 |
-
transition: width 0.3s ease;
|
87 |
}
|
88 |
</style>
|
89 |
</head>
|
90 |
<body>
|
91 |
-
<
|
92 |
-
|
93 |
-
</div>
|
94 |
-
<div id="example-table"></div>
|
95 |
-
|
96 |
<script>
|
97 |
-
document.addEventListener('DOMContentLoaded', function() {
|
98 |
-
fetch('
|
99 |
.then(response => response.json())
|
100 |
.then(data => {
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
if (!item.curator) {
|
105 |
-
item.curator = 'Unknown'; // Установка значения по умолчанию
|
106 |
-
}
|
107 |
-
});
|
108 |
-
var table = new Tabulator("#example-table", {
|
109 |
-
data: data, // set table data
|
110 |
-
layout: "fitColumns", // fit columns to width of table
|
111 |
columns: [
|
112 |
-
{title:
|
113 |
-
{title:"
|
114 |
-
{title:"
|
115 |
-
{title:"Email", field:"email"},
|
116 |
-
{title:"
|
117 |
-
{title:"
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
color = 'gray';
|
132 |
-
}
|
133 |
-
return `<div style="width: 20px; height: 20px; background-color: ${color};"></div>`;
|
134 |
-
}},
|
135 |
-
{title:"Ссылка на пользователя в GC", field:"ad_url", formatter: function(cell, formatterParams, onRendered) {
|
136 |
-
var ad_url = cell.getValue();
|
137 |
-
return `<a href="${ad_url}" target="_blank">${ad_url}</a>`;
|
138 |
-
}},
|
139 |
-
{title:"Ссылка на VK", field:"vk_id", formatter: function(cell, formatterParams, onRendered) {
|
140 |
-
var vk_id = cell.getValue();
|
141 |
-
return `<a href="https://vk.com/id${vk_id}" target="_blank">${vk_id}</a>`;
|
142 |
-
}},
|
143 |
-
{title:"Ссылка на Tg", field:"chat_id", formatter: function(cell, formatterParams, onRendered) {
|
144 |
-
var chatId = cell.getValue();
|
145 |
-
if (chatId.startsWith('@')) {
|
146 |
-
chatId = chatId.substring(1); // Удаление символа @ в начале
|
147 |
-
}
|
148 |
-
return `<a href="https://t.me/${chatId}" target="_blank">${chatId}</a>`;
|
149 |
-
}},
|
150 |
-
{title:"Ссылка на WhatsApp", field:"phone", formatter: function(cell, formatterParams, onRendered) {
|
151 |
-
var phone = cell.getValue();
|
152 |
-
return `<a href="https://web.whatsapp.com/send?phone=${phone}" target="_blank">${phone}</a>`;
|
153 |
-
}},
|
154 |
-
{title:"Статус WhatsApp", field:"ws_statys"},
|
155 |
-
{title:"Стутус подписки", field:"ws_stop"},
|
156 |
-
{title:"Вебинары", field:"web_statys"},
|
157 |
-
{title:"Прогрес по воронке", field:"fin_progress"},
|
158 |
-
{title:"utm_source", field:"pr1"},
|
159 |
-
{title:"utm_medium", field:"pr2"},
|
160 |
-
{title:"utm_campaign", field:"pr3"},
|
161 |
-
{title:"utm_term", field:"pr4"},
|
162 |
-
{title:"utm_content", field:"pr5"}
|
163 |
-
],
|
164 |
});
|
165 |
})
|
166 |
-
.catch(error => console.error('Error fetching
|
167 |
});
|
168 |
</script>
|
169 |
</body>
|
|
|
53 |
#mediaContainer img, #mediaContainer video {
|
54 |
max-width: 100%;
|
55 |
height: auto;
|
56 |
+
margin-bottom: 10px;
|
57 |
+
border-radius: 5px;
|
58 |
}
|
59 |
+
#mediaContainer p {
|
|
|
|
|
60 |
color: #333;
|
61 |
+
font-size: 18px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
text-align: center;
|
63 |
+
margin: 0;
|
64 |
+
font-weight: bold;
|
|
|
65 |
}
|
66 |
</style>
|
67 |
</head>
|
68 |
<body>
|
69 |
+
<h1>Контакты</h1>
|
70 |
+
<div id="tabulator-table"></div>
|
|
|
|
|
|
|
71 |
<script>
|
72 |
+
document.addEventListener('DOMContentLoaded', function () {
|
73 |
+
fetch('/data_gc_tab_out?api_sys=<YOUR_API_KEY>')
|
74 |
.then(response => response.json())
|
75 |
.then(data => {
|
76 |
+
new Tabulator("#tabulator-table", {
|
77 |
+
data: data,
|
78 |
+
layout: "fitColumns",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
columns: [
|
80 |
+
{ title: "ID", field: "id", visible: false },
|
81 |
+
{ title: "Name", field: "name" },
|
82 |
+
{ title: "Phone", field: "phone" },
|
83 |
+
{ title: "Email", field: "email" },
|
84 |
+
{ title: "Curator", field: "curator" },
|
85 |
+
{ title: "VK ID", field: "vk_id" },
|
86 |
+
{ title: "Chat ID", field: "chat_id" },
|
87 |
+
{ title: "WS Statys", field: "ws_statys" },
|
88 |
+
{ title: "WS Stop", field: "ws_stop" },
|
89 |
+
{ title: "Web Statys", field: "web_statys" },
|
90 |
+
{ title: "Fin Progress", field: "fin_progress" },
|
91 |
+
{ title: "Shop Statys Full", field: "shop_statys_full" },
|
92 |
+
{ title: "PR1", field: "pr1" },
|
93 |
+
{ title: "PR2", field: "pr2" },
|
94 |
+
{ title: "PR3", field: "pr3" },
|
95 |
+
{ title: "PR4", field: "pr4" },
|
96 |
+
{ title: "PR5", field: "pr5" },
|
97 |
+
{ title: "Ad URL", field: "ad_url" },
|
98 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
});
|
100 |
})
|
101 |
+
.catch(error => console.error('Error fetching contacts:', error));
|
102 |
});
|
103 |
</script>
|
104 |
</body>
|