DmitrMakeev commited on
Commit
8b2b898
·
verified ·
1 Parent(s): 383a97d

Update nutri_call.html

Browse files
Files changed (1) hide show
  1. nutri_call.html +0 -38
nutri_call.html CHANGED
@@ -8,45 +8,7 @@
8
  <!-- Тема -->
9
  <link href="https://cdn.jsdelivr.net/npm/@pnotify/core@5.2.0/dist/BrightTheme.css" rel="stylesheet">
10
 
11
- <!-- Скрипты -->
12
- <script type="module">
13
- import { alert, defaultModules } from 'https://cdn.jsdelivr.net/npm/@pnotify/core@5.2.0/dist/PNotify.js';
14
- import * as PNotifyMobile from 'https://cdn.jsdelivr.net/npm/@pnotify/mobile@5.2.0/dist/PNotifyMobile.js';
15
 
16
- // Инициализация мобильного модуля
17
- defaultModules.set(PNotifyMobile, {});
18
-
19
- // Теперь функция showCalculationStatus будет доступна глобально
20
- window.showCalculationStatus = function(response) {
21
- if (Object.keys(response.deficits || {}).length === 0) {
22
- alert({
23
- title: 'Успешный расчёт',
24
- text: 'Все элементы сбалансированы!',
25
- type: 'success',
26
- delay: 3000,
27
- modules: {
28
- Mobile: {
29
- swipeDismiss: true
30
- }
31
- }
32
- });
33
- } else {
34
- alert({
35
- title: 'Обнаружены отклонения',
36
- text: 'Дефициты: ' + Object.entries(response.deficits)
37
- .map(([el, val]) => `${el}: ${val.toFixed(2)}ppm`)
38
- .join(', '),
39
- type: 'error',
40
- delay: 5000,
41
- modules: {
42
- Mobile: {
43
- swipeDismiss: true
44
- }
45
- }
46
- });
47
- }
48
- };
49
- </script>
50
 
51
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
52
 
 
8
  <!-- Тема -->
9
  <link href="https://cdn.jsdelivr.net/npm/@pnotify/core@5.2.0/dist/BrightTheme.css" rel="stylesheet">
10
 
 
 
 
 
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
14