-
Notifications
You must be signed in to change notification settings - Fork 0
/
manager.js
31 lines (25 loc) · 967 Bytes
/
manager.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const socket = io();
socket.on('connect', function() {
console.log('Связь есть');
});
socket.on('person_respons', function(data) {
const popup = document.getElementById('popup-block');
const client_number = `<p id="ticket-number">${data}</p>`;
popup.innerHTML = client_number;
});
$("button").on('click', function() {
var value = $(this).val();
var username = $("#username").val();
var userLastname = $("#userLastname").val();
var birthdate = $("#birthdate").val();
var phone = $("#phone").val();
if (username && birthdate && phone && userLastname) {
console.log(value, username, userLastname, phone, birthdate);
socket.emit('next_client', {operation: value, username: username, userLastname: userLastname, phone: phone, birthdate: birthdate});
}
else {
$(document).ready(function(){
PopUpHide();
});
}
});