DmitrMakeev
commited on
Commit
•
e26678d
1
Parent(s):
f158535
Update biz_v.html
Browse files- biz_v.html +75 -138
biz_v.html
CHANGED
@@ -22,11 +22,21 @@
|
|
22 |
font-size: 28px;
|
23 |
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
24 |
}
|
25 |
-
.
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
29 |
text-align: left;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
.form-group label {
|
32 |
display: block;
|
@@ -36,12 +46,11 @@
|
|
36 |
.form-group input,
|
37 |
.form-group select {
|
38 |
width: 100%;
|
39 |
-
padding: 12px;
|
40 |
font-size: 16px;
|
41 |
border: 1px solid #ccc;
|
42 |
border-radius: 5px;
|
43 |
box-sizing: border-box;
|
44 |
-
margin-bottom: 20px;
|
45 |
}
|
46 |
button {
|
47 |
display: block;
|
@@ -50,7 +59,7 @@
|
|
50 |
background-color: #4CAF50;
|
51 |
border: none;
|
52 |
cursor: pointer;
|
53 |
-
padding: 12px 24px;
|
54 |
font-size: 16px;
|
55 |
border-radius: 5px;
|
56 |
transition: background-color 0.3s ease;
|
@@ -58,22 +67,6 @@
|
|
58 |
button:hover {
|
59 |
background-color: #388E3C;
|
60 |
}
|
61 |
-
#dropdown-container {
|
62 |
-
margin-top: 20px;
|
63 |
-
}
|
64 |
-
#dropdown-container select {
|
65 |
-
width: 100%; /* Устанавливаем ширину выпадающего списка */
|
66 |
-
padding: 12px; /* Увеличиваем внутренний отступ */
|
67 |
-
font-size: 16px;
|
68 |
-
border: 1px solid #ccc;
|
69 |
-
border-radius: 5px;
|
70 |
-
box-sizing: border-box;
|
71 |
-
}
|
72 |
-
</style>
|
73 |
-
|
74 |
-
|
75 |
-
<style>
|
76 |
-
|
77 |
.input-row {
|
78 |
display: flex;
|
79 |
justify-content: center;
|
@@ -109,77 +102,57 @@
|
|
109 |
background-color: #388E3C;
|
110 |
}
|
111 |
</style>
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
</head>
|
124 |
<body>
|
125 |
-
<h1>WhatsGRM -
|
126 |
-
|
127 |
-
<div class="
|
128 |
-
<
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
<button id="sendGetRequestButton">Обновить базу пользователей WhatCRM</button>
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
<h1>Upload CSV File</h1>
|
168 |
-
<form id="uploadForm" enctype="multipart/form-data" method="post">
|
169 |
-
<div class="input-row">
|
170 |
-
<input type="file" name="file" accept=".csv">
|
171 |
</div>
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
</div>
|
180 |
-
|
181 |
-
</form>
|
182 |
-
<div id="result"></div>
|
183 |
|
184 |
<!-- Подключение скрипта Notyf -->
|
185 |
<script src="https://cdn.jsdelivr.net/npm/notyf/notyf.min.js"></script>
|
@@ -187,9 +160,8 @@
|
|
187 |
document.getElementById('uploadForm').addEventListener('submit', function(event) {
|
188 |
event.preventDefault();
|
189 |
const form = new FormData(this);
|
190 |
-
// Показываем сообщение "Загрузка началась, пожалуйста, подождите"
|
191 |
const notyf = new Notyf({
|
192 |
-
duration: 5000,
|
193 |
position: {
|
194 |
x: 'right',
|
195 |
y: 'top'
|
@@ -231,35 +203,6 @@
|
|
231 |
});
|
232 |
</script>
|
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 |
<script>
|
264 |
const notyf = new Notyf({
|
265 |
duration: 5000,
|
@@ -268,20 +211,14 @@
|
|
268 |
y: 'top',
|
269 |
},
|
270 |
});
|
271 |
-
|
272 |
let requestButtonClicked = false;
|
273 |
-
|
274 |
-
// Привязываем обработчики событий только один раз
|
275 |
document.getElementById('sendRequestButton').addEventListener('click', function() {
|
276 |
-
if (requestButtonClicked) return;
|
277 |
-
|
278 |
-
requestButtonClicked = true; // Устанавливаем флаг, что кнопка уже была нажата
|
279 |
-
|
280 |
const token = document.getElementById('tokenInput').value;
|
281 |
const minDate = document.getElementById('dateSelect').value;
|
282 |
const type = document.getElementById('typeSelect').value;
|
283 |
const url = '/send_request';
|
284 |
-
|
285 |
fetch(url, {
|
286 |
method: 'POST',
|
287 |
headers: {
|
@@ -299,14 +236,12 @@
|
|
299 |
notyf.error('Error: ' + error.message);
|
300 |
})
|
301 |
.finally(() => {
|
302 |
-
requestButtonClicked = false;
|
303 |
});
|
304 |
});
|
305 |
-
|
306 |
function createDropdown(data) {
|
307 |
const container = document.getElementById('dropdown-container');
|
308 |
-
container.innerHTML = '';
|
309 |
-
|
310 |
const select = document.createElement('select');
|
311 |
select.id = 'dropdown';
|
312 |
select.classList.add('form-group');
|
@@ -317,18 +252,14 @@
|
|
317 |
select.appendChild(option);
|
318 |
});
|
319 |
container.appendChild(select);
|
320 |
-
|
321 |
-
// Привязываем обработчик событий только один раз
|
322 |
const sendGetRequestButton = document.getElementById('sendGetRequestButton');
|
323 |
-
sendGetRequestButton.removeEventListener('click', handleGetRequest);
|
324 |
sendGetRequestButton.addEventListener('click', handleGetRequest);
|
325 |
}
|
326 |
-
|
327 |
function handleGetRequest() {
|
328 |
const selectedValue = document.getElementById('dropdown').value;
|
329 |
const token = document.getElementById('tokenInput').value;
|
330 |
const getUrl = '/send_get_request?token=' + encodeURIComponent(token) + '&webinarId=' + encodeURIComponent(selectedValue);
|
331 |
-
|
332 |
fetch(getUrl, {
|
333 |
method: 'GET'
|
334 |
})
|
@@ -346,3 +277,9 @@
|
|
346 |
</body>
|
347 |
</html>
|
348 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
font-size: 28px;
|
23 |
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
24 |
}
|
25 |
+
.container {
|
26 |
+
display: flex;
|
27 |
+
justify-content: space-around;
|
28 |
+
margin-top: 20px;
|
29 |
+
}
|
30 |
+
.block {
|
31 |
+
width: 45%;
|
32 |
text-align: left;
|
33 |
+
background-color: white;
|
34 |
+
padding: 20px;
|
35 |
+
border-radius: 10px;
|
36 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
37 |
+
}
|
38 |
+
.form-group {
|
39 |
+
margin: 20px 0;
|
40 |
}
|
41 |
.form-group label {
|
42 |
display: block;
|
|
|
46 |
.form-group input,
|
47 |
.form-group select {
|
48 |
width: 100%;
|
49 |
+
padding: 12px;
|
50 |
font-size: 16px;
|
51 |
border: 1px solid #ccc;
|
52 |
border-radius: 5px;
|
53 |
box-sizing: border-box;
|
|
|
54 |
}
|
55 |
button {
|
56 |
display: block;
|
|
|
59 |
background-color: #4CAF50;
|
60 |
border: none;
|
61 |
cursor: pointer;
|
62 |
+
padding: 12px 24px;
|
63 |
font-size: 16px;
|
64 |
border-radius: 5px;
|
65 |
transition: background-color 0.3s ease;
|
|
|
67 |
button:hover {
|
68 |
background-color: #388E3C;
|
69 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
.input-row {
|
71 |
display: flex;
|
72 |
justify-content: center;
|
|
|
102 |
background-color: #388E3C;
|
103 |
}
|
104 |
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
</head>
|
106 |
<body>
|
107 |
+
<h1>WhatsGRM - Обновление</h1>
|
108 |
+
|
109 |
+
<div class="container">
|
110 |
+
<div class="block">
|
111 |
+
<h2>Обновление Бизон 365</h2>
|
112 |
+
<div class="form-group">
|
113 |
+
<label for="tokenInput">API-токен администратора Бизон 365:</label>
|
114 |
+
<input type="text" id="tokenInput" placeholder="Введите токен">
|
115 |
+
</div>
|
116 |
+
<div class="form-group">
|
117 |
+
<label for="dateSelect">Выбор даты:</label>
|
118 |
+
<select id="dateSelect">
|
119 |
+
<option value="2021-01-01T00:00:00">2021-01-01</option>
|
120 |
+
<option value="2022-01-01T00:00:00">2022-01-01</option>
|
121 |
+
<option value="2023-01-01T00:00:00">2023-01-01</option>
|
122 |
+
<option value="2024-01-01T00:00:00">2024-01-01</option>
|
123 |
+
</select>
|
124 |
+
</div>
|
125 |
+
<div class="form-group">
|
126 |
+
<label for="typeSelect">Выбор формата вебинара:</label>
|
127 |
+
<select id="typeSelect">
|
128 |
+
<option value="AutoWebinars">Автовебинарные комнаты</option>
|
129 |
+
<option value="LiveWebinars">Вебинарные комнаты</option>
|
130 |
+
</select>
|
131 |
+
</div>
|
132 |
+
<button id="sendRequestButton">Получить список комнат Бизон 365</button>
|
133 |
+
<div id="dropdown-container"></div>
|
134 |
+
<button id="sendGetRequestButton">Обновить базу пользователей WhatCRM</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
</div>
|
136 |
+
|
137 |
+
<div class="block">
|
138 |
+
<h2>Обновление CSV</h2>
|
139 |
+
<form id="uploadForm" enctype="multipart/form-data" method="post">
|
140 |
+
<div class="input-row">
|
141 |
+
<input type="file" name="file" accept=".csv">
|
142 |
+
</div>
|
143 |
+
<div class="input-row">
|
144 |
+
<label>
|
145 |
+
<input type="checkbox" name="verify_phone" value="1"> Verify Phone
|
146 |
+
</label>
|
147 |
+
<label>
|
148 |
+
<input type="checkbox" name="add_curator" value="1"> Add Curator
|
149 |
+
</label>
|
150 |
+
</div>
|
151 |
+
<input id="uploadButton" type="submit" value="Upload">
|
152 |
+
</form>
|
153 |
+
<div id="result"></div>
|
154 |
</div>
|
155 |
+
</div>
|
|
|
|
|
156 |
|
157 |
<!-- Подключение скрипта Notyf -->
|
158 |
<script src="https://cdn.jsdelivr.net/npm/notyf/notyf.min.js"></script>
|
|
|
160 |
document.getElementById('uploadForm').addEventListener('submit', function(event) {
|
161 |
event.preventDefault();
|
162 |
const form = new FormData(this);
|
|
|
163 |
const notyf = new Notyf({
|
164 |
+
duration: 5000,
|
165 |
position: {
|
166 |
x: 'right',
|
167 |
y: 'top'
|
|
|
203 |
});
|
204 |
</script>
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
<script>
|
207 |
const notyf = new Notyf({
|
208 |
duration: 5000,
|
|
|
211 |
y: 'top',
|
212 |
},
|
213 |
});
|
|
|
214 |
let requestButtonClicked = false;
|
|
|
|
|
215 |
document.getElementById('sendRequestButton').addEventListener('click', function() {
|
216 |
+
if (requestButtonClicked) return;
|
217 |
+
requestButtonClicked = true;
|
|
|
|
|
218 |
const token = document.getElementById('tokenInput').value;
|
219 |
const minDate = document.getElementById('dateSelect').value;
|
220 |
const type = document.getElementById('typeSelect').value;
|
221 |
const url = '/send_request';
|
|
|
222 |
fetch(url, {
|
223 |
method: 'POST',
|
224 |
headers: {
|
|
|
236 |
notyf.error('Error: ' + error.message);
|
237 |
})
|
238 |
.finally(() => {
|
239 |
+
requestButtonClicked = false;
|
240 |
});
|
241 |
});
|
|
|
242 |
function createDropdown(data) {
|
243 |
const container = document.getElementById('dropdown-container');
|
244 |
+
container.innerHTML = '';
|
|
|
245 |
const select = document.createElement('select');
|
246 |
select.id = 'dropdown';
|
247 |
select.classList.add('form-group');
|
|
|
252 |
select.appendChild(option);
|
253 |
});
|
254 |
container.appendChild(select);
|
|
|
|
|
255 |
const sendGetRequestButton = document.getElementById('sendGetRequestButton');
|
256 |
+
sendGetRequestButton.removeEventListener('click', handleGetRequest);
|
257 |
sendGetRequestButton.addEventListener('click', handleGetRequest);
|
258 |
}
|
|
|
259 |
function handleGetRequest() {
|
260 |
const selectedValue = document.getElementById('dropdown').value;
|
261 |
const token = document.getElementById('tokenInput').value;
|
262 |
const getUrl = '/send_get_request?token=' + encodeURIComponent(token) + '&webinarId=' + encodeURIComponent(selectedValue);
|
|
|
263 |
fetch(getUrl, {
|
264 |
method: 'GET'
|
265 |
})
|
|
|
277 |
</body>
|
278 |
</html>
|
279 |
|
280 |
+
|
281 |
+
|
282 |
+
|
283 |
+
|
284 |
+
|
285 |
+
|