Додан моніторінг застосунку
Додани веб компоненти карточок територій та повідомлень
This commit is contained in:
@@ -279,12 +279,6 @@ const Territory_Manager = {
|
||||
};
|
||||
|
||||
L.polygon(data.points, polygonOptions).addTo(map_territory);
|
||||
|
||||
console.log(data.zoom);
|
||||
|
||||
// setTimeout(() => {
|
||||
// map_territory.setZoom(data.zoom);
|
||||
// }, 200)
|
||||
},
|
||||
mess: {
|
||||
open: ({ type, id, number, mode }) => {
|
||||
@@ -359,11 +353,14 @@ const Territory_Manager = {
|
||||
|
||||
if (!response.ok) throw new Error("Failed to assign");
|
||||
|
||||
Notifier.success('Територія призначина успішно');
|
||||
|
||||
Territory_Manager.mess.close();
|
||||
Territory_Manager.entrances.list = [];
|
||||
await Territory_Manager.entrances.setHTML(type, id);
|
||||
} catch (err) {
|
||||
console.error('❌ Error:', err);
|
||||
Notifier.error('Помилка призначення території');
|
||||
const errorText = "Помилка";
|
||||
if (newButton) newButton.innerText = errorText;
|
||||
if (groupButton) groupButton.innerText = errorText;
|
||||
@@ -391,8 +388,11 @@ const Territory_Manager = {
|
||||
|
||||
Territory_Manager.entrances.list = [];
|
||||
await Territory_Manager.entrances.setHTML(type, id);
|
||||
|
||||
Notifier.success('Територія забрана успішно');
|
||||
} catch (error) {
|
||||
console.error("❌ Помилка зняття призначення:", error);
|
||||
Notifier.error('Помилка зняття призначення');
|
||||
if (button) button.innerText = "Помилка";
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user