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

Додане повідомлення про оновлення застосунку
Оновлен 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

@@ -1,7 +1,7 @@
const db = require("../config/db");
class HomesteadsService {
getList(group, sheepName) {
getList(mode, id) {
return new Promise((res, rej) => {
let sql = `
SELECT
@@ -17,7 +17,7 @@ class HomesteadsService {
homestead
`;
if (group != "0" && !sheepName) {
if (mode == "group") {
sql = `
SELECT
homestead.*,
@@ -39,11 +39,9 @@ class HomesteadsService {
AND
homestead_history.name = 'Групова'
AND
homestead_history.group_id == '${group}'
homestead_history.group_id = '${id}'
`;
}
if (sheepName) {
} else if (mode == "sheep" || mode == "admin") {
sql = `
SELECT
homestead.*,
@@ -63,7 +61,7 @@ class HomesteadsService {
AND
homestead_history.working = 1
AND
homestead_history.name = '${sheepName}';
homestead_history.sheep_id = '${id}';
`;
}