Додана сторінка "Стенд"

Додане повідомлення про оновлення застосунку
Оновлен Service Worker
Перероблен WebSocket APІ
This commit is contained in:
2025-10-19 00:55:30 +03:00
parent 6ec6523d71
commit 3f08f3f6c9
46 changed files with 2651 additions and 2691 deletions

View File

@@ -45,7 +45,7 @@ class HousesService {
"history": {
"id": row.entrance_history_id ? Number(row.entrance_history_id) : null,
"name": row.entrance_history_name,
"group_id": row.entrance_history_group_id ? Number(row.entrance_history_group_id) : null,
"group_id": row.entrance_history_group_id ? Number(row.entrance_history_group_id) : null,
"sheep_id": row.entrance_history_sheep_id ? Number(row.entrance_history_sheep_id) : null,
"date": {
"start": row.entrance_history_date_start ? Number(row.entrance_history_date_start) : null,
@@ -61,7 +61,7 @@ class HousesService {
});
}
getList(group, sheepName) {
getList(mode, id) {
return new Promise((res, rej) => {
let sql = `
SELECT
@@ -72,7 +72,7 @@ class HousesService {
house
`;
if (group != "0" && !sheepName) {
if (mode == "group") {
sql = `
SELECT DISTINCT
house.*,
@@ -89,11 +89,9 @@ class HousesService {
AND
entrance_history.name = 'Групова'
AND
entrance_history.group_id == '${group}'
entrance_history.group_id = '${id}'
`;
}
if (sheepName) {
} else if (mode == "sheep" || mode == "admin") {
sql = `
SELECT DISTINCT
house.*,
@@ -108,7 +106,7 @@ class HousesService {
WHERE
entrance_history.working = 1
AND
entrance_history.name = '${sheepName}'
entrance_history.sheep_id = '${id}'
`;
}