Додана сторінка "Стенд"
Додане повідомлення про оновлення застосунку Оновлен Service Worker Перероблен WebSocket APІ
This commit is contained in:
@@ -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}'
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user