Поправил кубсат и добавил библиотеку luxon

This commit is contained in:
2025-12-11 11:27:01 +03:00
parent f79efd88e5
commit f5875e5b87
4 changed files with 86 additions and 22 deletions

View File

@@ -218,7 +218,7 @@ const requestsTable = new Tabulator("#requestsTable", {
selectableRangeMode: "click",
pagination: true,
paginationSize: 50,
paginationSizeSelector: [25, 50, 100, 200],
paginationSizeSelector: [50, 200, 500, true],
paginationCounter: "rows",
columns: [
{
@@ -235,21 +235,48 @@ const requestsTable = new Tabulator("#requestsTable", {
{title: "Ист.", field: "source_id", width: 55, formatter: sourceFormatter},
{title: "Спутник", field: "satellite_name", width: 100},
{title: "Статус", field: "status", width: 105, formatter: statusFormatter},
{title: "Приоритет", field: "priority", width: 85, formatter: priorityFormatter},
{title: "Заявка", field: "request_date", width: 85},
{title: "Карточка", field: "card_date", width: 85},
{title: "Планирование", field: "planned_at", width: 120},
{title: "Приоритет", field: "priority", width: 105, formatter: priorityFormatter},
{title: "Заявка", field: "request_date_display", width: 105,
sorter: function(a, b, aRow, bRow) {
const dateA = aRow.getData().request_date;
const dateB = bRow.getData().request_date;
if (!dateA && !dateB) return 0;
if (!dateA) return 1;
if (!dateB) return -1;
return new Date(dateA) - new Date(dateB);
}
},
{title: "Карточка", field: "card_date_display", width: 120,
sorter: function(a, b, aRow, bRow) {
const dateA = aRow.getData().card_date;
const dateB = bRow.getData().card_date;
if (!dateA && !dateB) return 0;
if (!dateA) return 1;
if (!dateB) return -1;
return new Date(dateA) - new Date(dateB);
}
},
{title: "Планирование", field: "planned_at_display", width: 150,
sorter: function(a, b, aRow, bRow) {
const dateA = aRow.getData().planned_at;
const dateB = bRow.getData().planned_at;
if (!dateA && !dateB) return 0;
if (!dateA) return 1;
if (!dateB) return -1;
return new Date(dateA) - new Date(dateB);
}
},
{title: "Down", field: "downlink", width: 65, hozAlign: "right", formatter: function(cell) { return numberFormatter(cell, 2); }},
{title: "Up", field: "uplink", width: 65, hozAlign: "right", formatter: function(cell) { return numberFormatter(cell, 2); }},
{title: "Пер.", field: "transfer", width: 50, hozAlign: "right", formatter: function(cell) { return numberFormatter(cell, 0); }},
{title: "Коорд. ГСО", field: "coords_lat", width: 110, formatter: coordsFormatter},
{title: "Район", field: "region", width: 80, formatter: function(cell) {
{title: "Коорд. ГСО", field: "coords_lat", width: 130, formatter: coordsFormatter},
{title: "Район", field: "region", width: 100, formatter: function(cell) {
const val = cell.getValue();
return val ? val.substring(0, 12) + (val.length > 12 ? '...' : '') : '-';
}},
{title: "ГСО", field: "gso_success", width: 50, hozAlign: "center", formatter: boolFormatter},
{title: "Куб", field: "kubsat_success", width: 50, hozAlign: "center", formatter: boolFormatter},
{title: "Коорд. ист.", field: "coords_source_lat", width: 110, formatter: coordsFormatter},
{title: "Коорд. ист.", field: "coords_source_lat", width: 140, formatter: coordsFormatter},
{title: "Комментарий", field: "comment", width: 180, formatter: commentFormatter},
{title: "Действия", field: "id", width: 105, formatter: actionsFormatter, headerSort: false},
],