Update data_gc_tab.html
Browse files- data_gc_tab.html +91 -34
data_gc_tab.html
CHANGED
|
@@ -53,53 +53,110 @@
|
|
| 53 |
#mediaContainer img, #mediaContainer video {
|
| 54 |
max-width: 100%;
|
| 55 |
height: auto;
|
| 56 |
-
|
| 57 |
-
border-radius:
|
| 58 |
}
|
| 59 |
-
#
|
|
|
|
|
|
|
| 60 |
color: #333;
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
text-align: center;
|
| 63 |
-
|
| 64 |
-
|
|
|
|
| 65 |
}
|
| 66 |
</style>
|
| 67 |
</head>
|
| 68 |
<body>
|
| 69 |
-
<
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
| 71 |
<script>
|
| 72 |
-
document.addEventListener('DOMContentLoaded', function
|
| 73 |
-
fetch('https://dmtuit-gc-api-ras.hf.space/data_gc_tab_out?api_sys=
|
| 74 |
.then(response => response.json())
|
| 75 |
.then(data => {
|
| 76 |
-
new Tabulator("#
|
| 77 |
-
data: data,
|
| 78 |
-
layout: "fitColumns",
|
| 79 |
columns: [
|
| 80 |
-
{
|
| 81 |
-
{
|
| 82 |
-
{
|
| 83 |
-
{
|
| 84 |
-
{
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
});
|
| 100 |
})
|
| 101 |
-
.catch(error => console.error('Error fetching
|
| 102 |
});
|
| 103 |
</script>
|
| 104 |
</body>
|
| 105 |
-
</html>
|
|
|
|
| 53 |
#mediaContainer img, #mediaContainer video {
|
| 54 |
max-width: 100%;
|
| 55 |
height: auto;
|
| 56 |
+
object-fit: contain;
|
| 57 |
+
border-radius: 10px;
|
| 58 |
}
|
| 59 |
+
#imageUrl {
|
| 60 |
+
margin-top: 20px;
|
| 61 |
+
font-size: 16px;
|
| 62 |
color: #333;
|
| 63 |
+
cursor: pointer;
|
| 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 |
+
line-height: 20px;
|
| 85 |
+
color: white;
|
| 86 |
+
transition: width 0.3s ease;
|
| 87 |
}
|
| 88 |
</style>
|
| 89 |
</head>
|
| 90 |
<body>
|
| 91 |
+
<div id="header">
|
| 92 |
+
<h1>База синхронизации с GetCourse</h1>
|
| 93 |
+
</div>
|
| 94 |
+
<div id="example-table"></div>
|
| 95 |
+
|
| 96 |
<script>
|
| 97 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 98 |
+
fetch('https://dmtuit-gc-api-ras.hf.space/data_gc_tab_out?api_sys=fasSd345D')
|
| 99 |
.then(response => response.json())
|
| 100 |
.then(data => {
|
| 101 |
+
var table = new Tabulator("#example-table", {
|
| 102 |
+
data: data, // set table data
|
| 103 |
+
layout: "fitColumns", // fit columns to width of table
|
| 104 |
columns: [
|
| 105 |
+
{title:"Номер в списке", field:"id"},
|
| 106 |
+
{title:"Имя", field:"name"},
|
| 107 |
+
{title:"Телефон", field:"phone"},
|
| 108 |
+
{title:"Email", field:"email"},
|
| 109 |
+
{title:"Статус покупки", field:"shop_statys_full", formatter: function(cell, formatterParams, onRendered) {
|
| 110 |
+
var status = cell.getValue();
|
| 111 |
+
var color;
|
| 112 |
+
switch (status) {
|
| 113 |
+
case 'green':
|
| 114 |
+
color = 'green';
|
| 115 |
+
break;
|
| 116 |
+
case 'red':
|
| 117 |
+
color = 'red';
|
| 118 |
+
break;
|
| 119 |
+
case 'yellow':
|
| 120 |
+
color = 'yellow';
|
| 121 |
+
break;
|
| 122 |
+
default:
|
| 123 |
+
color = 'gray';
|
| 124 |
+
}
|
| 125 |
+
return `<div style="width: 20px; height: 20px; background-color: ${color};"></div>`;
|
| 126 |
+
}},
|
| 127 |
+
{title:"Ссылка на пользователя в GC", field:"ad_url", formatter: function(cell, formatterParams, onRendered) {
|
| 128 |
+
var ad_url = cell.getValue();
|
| 129 |
+
return `<a href="${ad_url}" target="_blank">${ad_url}</a>`;
|
| 130 |
+
}},
|
| 131 |
+
{title:"Ссылка на VK", field:"vk_id", formatter: function(cell, formatterParams, onRendered) {
|
| 132 |
+
var vk_id = cell.getValue();
|
| 133 |
+
return `<a href="https://vk.com/id${vk_id}" target="_blank">${vk_id}</a>`;
|
| 134 |
+
}},
|
| 135 |
+
{title:"Ссылка на Tg", field:"chat_id", formatter: function(cell, formatterParams, onRendered) {
|
| 136 |
+
var chatId = cell.getValue();
|
| 137 |
+
if (chatId.startsWith('@')) {
|
| 138 |
+
chatId = chatId.substring(1); // Удаление символа @ в начале
|
| 139 |
+
}
|
| 140 |
+
return `<a href="https://t.me/${chatId}" target="_blank">${chatId}</a>`;
|
| 141 |
+
}},
|
| 142 |
+
{title:"Ссылка на WhatsApp", field:"phone", formatter: function(cell, formatterParams, onRendered) {
|
| 143 |
+
var phone = cell.getValue();
|
| 144 |
+
return `<a href="https://web.whatsapp.com/send?phone=${phone}" target="_blank">${phone}</a>`;
|
| 145 |
+
}},
|
| 146 |
+
{title:"Статус WhatsApp", field:"ws_statys"},
|
| 147 |
+
{title:"Стутус подписки", field:"ws_stop"},
|
| 148 |
+
{title:"Вебинары", field:"web_statys"},
|
| 149 |
+
{title:"Прогрес по воронке", field:"fin_progress"},
|
| 150 |
+
{title:"utm_source", field:"pr1"},
|
| 151 |
+
{title:"utm_medium", field:"pr2"},
|
| 152 |
+
{title:"utm_campaign", field:"pr3"},
|
| 153 |
+
{title:"utm_term", field:"pr4"},
|
| 154 |
+
{title:"utm_content", field:"pr5"}
|
| 155 |
+
],
|
| 156 |
});
|
| 157 |
})
|
| 158 |
+
.catch(error => console.error('Error fetching data:', error));
|
| 159 |
});
|
| 160 |
</script>
|
| 161 |
</body>
|
| 162 |
+
</html>
|