refactor [P-01]: бэк

This commit is contained in:
Nukeap committed 2025-02-11 14:16:58 +03:00
1 parent 405212618d
commit 281b64cffe
70 files changed
+1105 -719

No files matched your search

+2 -1
View File
@@ -671,7 +671,8 @@ export default withMermaid({
collapsed: true,
items: [
{ text: 'Как установить', link: '/guides/install' },
{ text: 'Как использовать', link: '/guides/usage' }
{ text: 'Как использовать', link: '/guides/usage' },
{ text: 'Правила комитов', link: '/guides/commits' }
]
}
]
@@ -0,0 +1,181 @@
<template>
<div>
<h2>Результаты тестов:</h2>
<!-- Общее состояние тестов -->
<div v-if="results.success" class="success">✅ Все тесты успешно пройдены!</div>
<div v-else-if="results.numFailedTestSuites > 0" class="error">
❌ Ошибки в тестах: {{ results.numFailedTestSuites }} из {{ results.numTotalTestSuites }}
</div>
<!-- Сводная информация -->
<div v-if="results.testResults" class="summary">
<h3>Сводка по тестам:</h3>
<ul>
<li><strong>Общее количество тестов:</strong> {{ results.numTotalTests }}</li>
<li>
<strong>Пройдено:</strong> {{ results.numPassedTests }} ({{
getPercentage(results.numPassedTests, results.numTotalTests)
}}%)
</li>
<li>
<strong>Неудачных:</strong> {{ results.numFailedTests }} ({{
getPercentage(results.numFailedTests, results.numTotalTests)
}}%)
</li>
</ul>
</div>
<!-- Список успешных тестов -->
<div v-if="passedTests.length">
<h3>Успешные тесты:</h3>
<ul>
<li v-for="test in passedTests" :key="test.fullName">
<strong>{{ test.fullName }}</strong> ✅ ({{ test.duration }} мс)
</li>
</ul>
</div>
<!-- Список неудачных тестов -->
<div v-if="failedTests.length">
<h3>Неудачные тесты:</h3>
<ul>
<li v-for="(test, index) in failedTests" :key="test.fullName">
<strong>{{ test.fullName }}</strong> ❌ ({{ test.duration }} мс)
<pre v-if="test.failureMessages.length" class="error-log">
<button @click="toggleError(index)" class="error-toggle-btn">
{{ isErrorVisible(index) ? 'Скрыть ошибки' : 'Показать ошибки' }}
</button>
<div v-if="isErrorVisible(index)">
<strong>Ожидалось:</strong> {{ extractTestValue(test.failureMessages, 'Expected') }}
<strong>Получено:</strong> {{ extractTestValue(test.failureMessages, 'Received') }}
</div>
</pre>
</li>
</ul>
</div>
</div>
</template>
<script setup>
import { ref, onMounted, computed } from 'vue';
const results = ref({});
const errorMessage = ref('');
const errorVisibility = ref({});
const toggleError = (index) => {
errorVisibility.value[index] = !errorVisibility.value[index];
};
const isErrorVisible = (index) => {
return !!errorVisibility.value[index];
};
const getPercentage = (num, total) => {
return ((num / total) * 100).toFixed(2);
};
onMounted(async () => {
try {
const response = await fetch('/test-results.json');
const data = await response.json();
results.value = data;
if (!data.success) {
errorMessage.value = data.testResults
.map((t) => (t.failureMessages ? t.failureMessages.join('\n') : ''))
.join('\n\n');
}
} catch (error) {
errorMessage.value = error;
}
});
const passedTests = computed(() => {
return (
results.value?.testResults?.flatMap((testSuite) =>
testSuite.assertionResults
?.filter((test) => test.status === 'passed')
.map((test) => ({
...test,
failureMessages: test.failureMessages || [],
})),
) || []
);
});
const failedTests = computed(() => {
return (
results.value?.testResults?.flatMap((testSuite) =>
testSuite.assertionResults
?.filter((test) => test.status === 'failed')
.map((test) => ({
...test,
failureMessages: test.failureMessages || [],
})),
) || []
);
});
// Очистка от лишних данных и ANSI кодов
/* eslint-disable no-control-regex */
const cleanTestMessage = (message) => {
return message.replace(/[\x1b][[0-?9;]*[mG]/g, '').trim();
};
/* eslint-enable no-control-regex */
// Универсальная функция для извлечения данных из сообщений
const extractTestValue = (messages, type) => {
const failureMessage = messages.find((msg) => msg.includes(type + ':'));
if (failureMessage) {
const match = failureMessage.match(new RegExp(`${type}: (.*)`));
if (match) {
return cleanTestMessage(match[1]);
}
}
return 'Не указано';
};
</script>
<style scoped>
.success {
color: green;
font-weight: bold;
}
.error {
color: red;
font-weight: bold;
}
.warning {
color: orange;
font-weight: bold;
}
.error-log {
background: rgba(255, 221, 221, 0.1);
border-left: 4px solid red;
padding: 5px;
white-space: pre-wrap;
font-family: monospace;
}
.summary {
margin-bottom: 20px;
}
.error-toggle-btn {
background-color: #ff6347;
color: white;
border: none;
padding: 5px;
cursor: pointer;
margin-bottom: 5px;
}
.error-toggle-btn:hover {
background-color: #ff4500;
}
</style>
+19
View File
@@ -0,0 +1,19 @@
import DefaultTheme from 'vitepress/theme';
import { withMermaid } from 'vitepress-plugin-mermaid';
import TestRunner from './components/TestRunner.vue';
export default withMermaid({
...DefaultTheme,
themeConfig: {
search: {
provider: 'local',
},
},
mermaid: {},
mermaidPlugin: {
class: 'mermaid my-class',
},
enhanceApp({ app }) {
app.component('TestRunner', TestRunner);
},
});
+21
View File
@@ -0,0 +1,21 @@
## Заголовок должен содержать тип, номер задачи и название коммита.
Формат: <тип> [<номер задачи>]: <название>
| Название | Описание |
|----------|----------|
| `feat` | Новый функционал |
| `fix` | Исправление ошибки |
| `docs` | Изменения в документации |
| `style` | Изменения, не влияющие на функциональность |
| `refactor` | Изменения кода, не исправляющие ошибки и не добавляющие функционал |
| `perf` | Изменения, улучшающие производительность |
| `test` | Добавление тестов |
| `chore` | Изменения в процессе сборки или вспомогательных инструментах. |
Пример:
```bash
feat [X-01]: я тут накоммитил
```
+6 -5
View File
@@ -3,12 +3,12 @@
## Добавление комментариев для генерации документации
### Название компонента
### Описание компонента
Название компонента должно быть указано первым комментарием в теге `<template>`:
Описание компонента должно быть указано первым комментарием в теге `<template>`:
```html
<!-- Название -->
<!-- Описание -->
```
## Порядок структуры `<script>`
@@ -26,12 +26,13 @@
props: {
LikeDialog: {
type: Boolean,
default: false
default: false,
comment: 'Модалка лайка'
}
}
```
> Пропсы не нужно дополнительно комментировать, главное сохранять поля type и default.
> Поля default и comment являются опциональными. Commnet записывается в одиночные ковычки.
## Переменные
+6
View File
@@ -17,5 +17,11 @@ features:
- title: Инструкция по ведению и заполнению
details: Подробная инструкция по ведению и заполнению
link: /guides/usage
- title: Правила коммитов
details: Подробная инструкция по наименованию коммитов
link: /guides/commits
- title: Тестирование проекта
details: Запуск автотестов
link: /tests
---
+3 -4
View File
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `news` | `Object` | `{` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `news` | `Object` | `{` | нет комментария |
## Пример использования
+3 -4
View File
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `tabs` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `tabs` | `Object` | `() => {` | нет комментария |
## Пример использования
+3 -4
View File
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `voteTime` | `Object` | `() => { return {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `voteTime` | `Object` | `() => { return {` | нет комментария |
## Пример использования
@@ -4,10 +4,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `data` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `data` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `top` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `top` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `indicator` | `Object` | `{` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `indicator` | `Object` | `{` | нет комментария |
## Пример использования
@@ -4,10 +4,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `comment` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `comment` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `feedback` | `Object` | `() => {return {feed:[]` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `feedback` | `Object` | `() => {return {feed:[]` | нет комментария |
## Пример использования
@@ -2,61 +2,62 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `dataLineChart` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `dataLineChart` | `Object` | `() => {` | нет комментария |
| `period` | `Object` | `() => {` | нет комментария |
| `filter` | `String` | `'d'` | нет комментария |
## Описание переменных
| Переменная | Значение | Описание |
|------------|----------|----------|
| `baseunic` | `unicperson(fullper.value.filter(e => new Date(e.visitdate) >moment(new Date(date)).subtract(between.value*2, 'd') && new Date(e.visitdate) <= moment(new Date(date)).subtract(between.value, 'd')))
let crrunic = unicperson(fullper.value.filter(e => new Date(e.visitdate) >moment(new Date(date)).subtract(between.value, 'd') && new Date(e.visitdate) <= new Date(date)))
let bothuser = new Set([...baseunic].filter(element => crrunic.has(element)))
if (date ==formatDash(filterStore.date_period.enddate)) {
editCRR(bothuser.size*100/baseunic.size)
}
return baseunic.size ==0?0:bothuser.size*100/baseunic.size
}
| `baseunic` | <pre>unicperson(fullper.value.filter(e<br>=> new Date(e.visitdate)<br>>moment(new<br>Date(date)).subtract(between.value*2,<br>'d') && new Date(e.visitdate)<br><= moment(new<br>Date(date)).subtract(between.value,<br>'d')))<br>
let crrunic =<br>unicperson(fullper.value.filter(e<br>=> new Date(e.visitdate)<br>>moment(new<br>Date(date)).subtract(between.value,<br>'d') && new Date(e.visitdate)<br><= new Date(date)))<br>
let bothuser = new<br>Set([...baseunic].filter(element<br>=> crrunic.has(element)))<br>
<br>
if (date<br>==formatDash(filterStore.date_period.enddate))<br>{<br>
<br>editCRR(bothuser.size*100/baseunic.size)<br>
}<br>
<br>
return baseunic.size<br>==0?0:bothuser.size*100/baseunic.size<br>
} <br>
const editCRR = (val) => {
emit('getCRR', val)
}
const unicperson = (arr) => {
let arrnew =[]
arr.forEach(e => arrnew.push(...e.user) )
return new Set(arrnew)
}
const editCRR = (val) =><br>{<br>
<br>
emit('getCRR', val)<br>
}<br>
<br>
const unicperson = (arr)<br>=> {<br>
<br>
let arrnew =[]<br>
arr.forEach(e =><br>arrnew.push(...e.user) )<br>
return new Set(arrnew)<br>
}<br>
const data=computed({get() {
return JSON.parse(JSON.stringify(dataf.value))
}
})
const linear=ref(null)
const data=computed({get()<br>{<br>
<br>
return<br>JSON.parse(JSON.stringify(dataf.value))<br>
}<br>
})<br>
const linear=ref(null)<br>
const options = {
const options = {<br>
plugins: {
datalabels: {
color: 'grey',
align: 'top',
display: 'auto'
},
legend: {
onHover: (event, chartElement) => {
event.native.target.style.cursor ='pointer'` | <pre>Расчет значения crr, и передача в<br>родительский компонент значения, на<br>последнюю дату в периоде для компонента<br>card-total<br>
plugins: { <br>
<br>
datalabels: {<br>
color: 'grey',<br>
align: 'top',<br>
display:<br>'auto'<br>
},<br>
legend: {<br>
onHover:<br>(event, chartElement) => {<br>
<br>event.native.target.style.cursor<br>='pointer'<br></pre> | <pre>Расчет значения crr, и передача в<br>родительский компонент значения, на<br>последнюю дату в периоде для<br>компонента card-total<br>
@constructor<br>
@param {object} date - по каждому<br>дню, в указанном периоде (пример -<br>2024-03-22)<br>
@description Для расчетного<br>периода с 04<br></pre> |
@param {object} date - по<br>каждому дню, в указанном периоде<br>(пример - 2024-03-22)<br>
@description Для расчетного<br>периода с 04<br></pre> |
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `title` | `String` | `''` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `title` | `String` | `''` | нет комментария |
## Пример использования
@@ -2,10 +2,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `title` | `String` | `''` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `title` | `String` | `''` | нет комментария |
| `ico` | `String` | `''` | нет комментария |
## Пример использования
@@ -4,10 +4,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `alldata` | `Object` | `() => {return {period: []` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `alldata` | `Object` | `() => {return {period: []` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `pages_count` | `Array` | `() => []` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `pages_count` | `Array` | `() => []` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `nStaff` | `Number` | `0` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `nStaff` | `Number` | `0` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `info` | `Object` | `() => {return {tooltip: ''` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `info` | `Object` | `() => {return {tooltip: ''` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `info` | `Array` | `() => []` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `info` | `Array` | `() => []` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `activusers` | `Object` | `{` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `activusers` | `Object` | `{` | нет комментария |
## Пример использования
+3 -4
View File
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `datedefault` | `Date` | `''` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `datedefault` | `Date` | `''` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `rail` | `Boolean` | `false` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `rail` | `Boolean` | `false` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `files` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `files` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `rating` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `rating` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `rating` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `rating` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `author` | `Object` | `{` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `author` | `Object` | `{` | нет комментария |
## Пример использования
@@ -2,10 +2,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `opendialog` | `Boolean` | `false` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `opendialog` | `Boolean` | `false` | нет комментария |
| `author` | `Object` | `{` | нет комментария |
## Пример использования
@@ -2,10 +2,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `author` | `Object` | `{` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `author` | `Object` | `{` | нет комментария |
| `from_which` | `String` | `"dialog-search"` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `author` | `Object` | `{` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `author` | `Object` | `{` | нет комментария |
## Пример использования
+3 -4
View File
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `pretext` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `pretext` | `Object` | `() => {` | нет комментария |
## Пример использования
+4 -4
View File
@@ -2,10 +2,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `tooltip` | `Array` | `() => []` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `tooltip` | `Array` | `() => []` | нет комментария |
| `number` | `Number` | `0` | нет комментария |
## Пример использования
+2 -3
View File
@@ -2,9 +2,8 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
## Пример использования
@@ -12,10 +12,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `title` | `String` | `''` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `title` | `String` | `''` | нет комментария |
| `size` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `idVacations` | `Number` | `-1` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `idVacations` | `Number` | `-1` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `sText` | `String` | `""` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `sText` | `String` | `""` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `allEvent` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `allEvent` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -12,10 +12,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `title` | `String` | `""` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `title` | `String` | `""` | нет комментария |
| `newOrOld` | `Boolean` | `false` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `dateEventStart` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `dateEventStart` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,13 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `dateEvent` | `String` | `""` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `dateEvent` | `String` | `""` | нет комментария |
| `limitation` | `String` | `""` | нет комментария |
| `order` | `Array` | `[0` | нет комментария |
| `chek` | `Boolean` | `false` | нет комментария |
| `rule` | `Number` | `-1` | нет комментария |
## Пример использования
@@ -4,10 +4,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `staff` | `Array` | `() => []` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `staff` | `Array` | `() => []` | нет комментария |
| `okey` | `String` | `'selected'` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `calendar` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `calendar` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `calendars` | `Array` | `() => []` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `calendars` | `Array` | `() => []` | нет комментария |
## Пример использования
@@ -4,10 +4,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `eventCalendar` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `eventCalendar` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `opendialog` | `Boolean` | `false` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `opendialog` | `Boolean` | `false` | нет комментария |
## Пример использования
@@ -8,10 +8,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `event` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `event` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `event` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `event` | `Object` | `() => {` | нет комментария |
## Пример использования
@@ -4,10 +4,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `opendialog` | `Boolean` | `false` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `opendialog` | `Boolean` | `false` | нет комментария |
| `event` | `Object` | `() => {` | нет комментария |
## Пример использования
+3 -4
View File
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `LikeDialog` | `Boolean` | `false` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `LikeDialog` | `Boolean` | `false` | нет комментария |
## Пример использования
+3 -4
View File
@@ -9,10 +9,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `digitalData` | `Object` | `{` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `digitalData` | `Object` | `{` | нет комментария |
## Пример использования
+4 -4
View File
@@ -4,10 +4,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `idpos` | `Number` | `""` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `idpos` | `Number` | `""` | нет комментария |
| `namepos` | `String` | `""` | нет комментария |
## Пример использования
+3 -4
View File
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `endTime` | `Date` | `() => { return new Date.setFullYear()` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `endTime` | `Date` | `() => { return new Date.setFullYear()` | нет комментария |
## Пример использования
+5 -4
View File
@@ -4,10 +4,11 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `title` | `String` | `'Не забыть передать тайтл сюда!'` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `title` | `String` | `'Не забыть передать тайтл сюда!'` | нет комментария |
| `activeTab` | `Number` | `0` | нет комментария |
| `testingCard` | `Array` | `() => [` | нет комментария |
## Пример использования
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `title` | `String` | `'Название теста здесь'` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `title` | `String` | `'Название теста здесь'` | нет комментария |
## Пример использования
+3 -3
View File
@@ -2,9 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `item` | `Object` | `нет данных` | нет комментария |
## Пример использования
+3 -4
View File
@@ -4,10 +4,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `data` | `Object` | `() => ({` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `data` | `Object` | `() => ({` | нет комментария |
## Пример использования
+2 -3
View File
@@ -2,9 +2,8 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
## Пример использования
+5 -4
View File
@@ -4,10 +4,11 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `usersvotedbest` | `Array` | `()=>[]` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `usersvotedbest` | `Array` | `()=>[]` | нет комментария |
| `uservotedthanks` | `Array` | `()=>[]` | нет комментария |
| `all_cod` | `Array` | `()=>[]` | нет комментария |
## Пример использования
+4 -4
View File
@@ -2,10 +2,10 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `isFinished` | `Boolean` | `false` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `isFinished` | `Boolean` | `false` | нет комментария |
| `voteCard` | `Object` | `() => {` | нет комментария |
## Пример использования
+5 -4
View File
@@ -4,10 +4,11 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `type_fetch` | `String` | `'best'` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `type_fetch` | `String` | `'best'` | нет комментария |
| `persons` | `Array` | `() => []` | нет комментария |
| `myrealdep` | `Object` | `() => {` | нет комментария |
## Пример использования
+3 -3
View File
@@ -2,9 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `data` | `Object` | `нет данных` | нет комментария |
## Пример использования
+3 -4
View File
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `rail` | `Boolean` | `false` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `rail` | `Boolean` | `false` | нет комментария |
## Пример использования
+3 -4
View File
@@ -2,10 +2,9 @@
## Описание пропсов
| Пропс | Тип | Значение по умолчанию |
|-------|-----|-----------------------|
| `docSections` | `Object` | `() => {` |
| Пропс | Тип | Значение по умолчанию | Комментарий |
|-------|-----|-----------------------|-------------|
| `docSections` | `Object` | `() => {` | нет комментария |
## Пример использования
+7
View File
@@ -0,0 +1,7 @@
# Тестирование
<ClientOnly>
<TestRunner />
</ClientOnly>
+258 -245
View File
@@ -73,41 +73,41 @@
}
},
"node_modules/@algolia/client-abtesting": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.20.1.tgz",
"integrity": "sha512-73pnrUixMVnfjgldxhRi5eYLraMt95/MhQHevoFtqwy+t2hfayxYBZXJ2k6JJDld8UmjcWwq3wXnvZJCOm7vZA==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.20.2.tgz",
"integrity": "sha512-IS8JSFsDD33haaKIIFaL7qj3bEIG9GldZfb3ILW0QF3at7TcrIJYy58hrDvFee5T3p3E2aH/+wqIr0eha8jB/w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-common": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/client-analytics": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.20.1.tgz",
"integrity": "sha512-BRiyL+AwPfGTlo3HbrFDMeTK2z5SaJmB8PBd1JI66d6MeP85+38Mux2FFw+nvDOfBwlGaN/uw2AQTOZ9r4JYtA==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.20.2.tgz",
"integrity": "sha512-k0KxCfcX/HZySqPasKy6GkiiDuebaMh2v/nE0HHg1PbsyeyagLapDi6Ktjkxhz8NlUq6eTJR+ddGJegippKQtQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-common": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/client-common": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.20.1.tgz",
"integrity": "sha512-Dk4RhklaAbqLzOeJO/MoIFUjcKYGECiAJYYqDzmE/sbXICk5Uo6dGlv8w4z09lmvsASpNUoMvGYHGBK+WkEGpA==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.20.2.tgz",
"integrity": "sha512-xoZcL/Uu49KYDb3feu2n06gALD17p5CslO8Zk3mZ7+uTurK3lgjLws7LNetZ172Ap/GpzPCRXI83d2iDoYQD6Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -115,151 +115,151 @@
}
},
"node_modules/@algolia/client-insights": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.20.1.tgz",
"integrity": "sha512-eu5vhmyYgzZjFIPmkoLo/TU4s+IdsjQ+bEfLj2jcMvyfBD4DcqySKp03TrXjdrHPGO2I3fF7dPZOoCgEi1j2/g==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.20.2.tgz",
"integrity": "sha512-fy7aCbo9y7WHt/9G03EYc471Dd5kIaM8PNP4z6AEQYr9a9X8c4inwNs6tePxAEfRHwVQi0CZ7kuVdn6/MjWx1A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-common": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/client-personalization": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.20.1.tgz",
"integrity": "sha512-TrUCJ0nVqE0PnOGoRG/RCirxWZ6pF+skZgaaESN2IBnJtk/In14xVmoj8Yzck81bGUY/UI+5dUUOOS7YTSVEhQ==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.20.2.tgz",
"integrity": "sha512-ocL1ZXulfuXzJAwsKw2kMscKMD0rs/f4CFYu6Gjh4mK4um6rGfa1a6u1MSc4swFqRQer0wNP9Pi+kVfKhuKt5A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-common": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/client-query-suggestions": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.20.1.tgz",
"integrity": "sha512-rHHX/30R3Kkx2aZeR7/8+jU0s6h1cNPMAKOvcMUGVmoiuh46F1sxzmiswHLg6CuLrQ0ikhpdhn3ehFSJwHgp2Q==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.20.2.tgz",
"integrity": "sha512-Xjs4Tj1zkLCnmq1ys8RRhLQPy002I6GuT/nbHVdSQmQu4yKCI0gOFbwxHdM6yYPEuE3cJx7A4wSQjCH21mUKsg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-common": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/client-search": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.20.1.tgz",
"integrity": "sha512-YzHD0Nqp7AjvzbFrMIjhCUl6apHkWfZxKDSlMqf80mXkuG52wY289zFlvTfHjHK1nEiDslH3uHYAR/poOOa21Q==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.20.2.tgz",
"integrity": "sha512-2cD3RGB5byusLS0DAX1Nvl5MLiv7OoGgQrRs+94dTalqjvK8lGKzxxJhXoVojgx2qcROyIUAIDXFdTqv6NIHaA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-common": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/ingestion": {
"version": "1.20.1",
"resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.20.1.tgz",
"integrity": "sha512-sHNZ8b5tK7TvXMiiKK+89UsXnFthnAZc0vpwvDKygdTqvsfmfJPhthx36eHTAVYfh7NnA1+eqZsT/hMUGeZFkQ==",
"version": "1.20.2",
"resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.20.2.tgz",
"integrity": "sha512-S593Kmhc98+5zdzGet4GrZEBEBGl4vVtqg/MPfW8dCRf9qDRNYSkhBsIzlhQe9JWiohe9oB9LW5meibwOgRmww==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-common": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/monitoring": {
"version": "1.20.1",
"resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.20.1.tgz",
"integrity": "sha512-+fHd1U3gSeszCH03UtyUZmprpmcJH6aJKyUTOfY73lKKRR7hVofmV812ahScR0T4xUkBlGjTLeGnsKY0IG6K6Q==",
"version": "1.20.2",
"resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.20.2.tgz",
"integrity": "sha512-bW41aWLYgBv/coJUIT85mkN3kk1VBKsM8tlwB5S/s446Mgc7r8t5TX7kA8kCR2UbwDedOK51i/85/x/rM0ZXbg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-common": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/recommend": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.20.1.tgz",
"integrity": "sha512-+IuiUv3OSOFFKoXFMlZHfFzXGqEQbKhncpAcRSAtJmN4pupY4aNblvJ9Wv0SMm7/MSFRy2JLIoYWRSBpSV2yEg==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.20.2.tgz",
"integrity": "sha512-wBMf3J1L5ogvU8p8ifHkknDXWn1zdZ2epkqpt2MkUaZynE3G77rrFU9frcO+Pu1FQJQ5xCDTKcYUUcJCDD00rg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-common": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/requester-browser-xhr": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.20.1.tgz",
"integrity": "sha512-+RaJa5MpJqPHaSbBw0nrHeyIAd5C4YC9C1LfDbZJqrn5ZwOvHMUTod852XmzX/1S8oi1jTynB4FjicmauZIKwA==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.20.2.tgz",
"integrity": "sha512-w+VMzOkIq2XDGg6Ybzr74RlBZvJQnuIdKpVusQSXCXknvxwAwbO457LmoavhZWl06Lcsk9YDx1X2k0zb+iJQmw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1"
"@algolia/client-common": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/requester-fetch": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.20.1.tgz",
"integrity": "sha512-4l1cba8t02rNkLeX/B7bmgDg3CwuRunmuCSgN2zORDtepjg9YAU1qcyRTyc/rAuNJ54AduRfoBplmKXjowYzbQ==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.20.2.tgz",
"integrity": "sha512-wpjnbvbi3A13b0DvijE45DRYDvwcP5Ttz7RTMkPWTkF1s6AHuo6O2UcwGyaogMAGa1QOOzFYfp5u4YQwMOQx5g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1"
"@algolia/client-common": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@algolia/requester-node-http": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.20.1.tgz",
"integrity": "sha512-4npKo1qpLG5xusFoFUj4xIIR/6y3YoCuS/uhagv2blGFotDj+D6OLTML3Pp6JCVcES4zDbkoY7pmNBA8ARtidQ==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.20.2.tgz",
"integrity": "sha512-YuSSdtgUt1dFBTNYUb+2TA5j0Hd0eDXE0bVISjUvTCqmoaGsGLwW+rKI7p1eLQ1r7RESwBAvUwcY1qP2Wl3Lyw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-common": "5.20.1"
"@algolia/client-common": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
@@ -325,13 +325,13 @@
}
},
"node_modules/@babel/parser": {
"version": "7.26.7",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.7.tgz",
"integrity": "sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==",
"version": "7.26.8",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.8.tgz",
"integrity": "sha512-TZIQ25pkSoaKEYYaHbbxkfL36GNsQ6iFiBbeuzAkLnXayKR1yP1zFe+NxuZWWsUyvt8icPU9CCq0sgWGXR1GEw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/types": "^7.26.7"
"@babel/types": "^7.26.8"
},
"bin": {
"parser": "bin/babel-parser.js"
@@ -341,9 +341,9 @@
}
},
"node_modules/@babel/types": {
"version": "7.26.7",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.7.tgz",
"integrity": "sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==",
"version": "7.26.8",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.8.tgz",
"integrity": "sha512-eUuWapzEGWFEpHFxgEaBG8e3n6S8L3MSu0oda755rOfabWPnh0Our1AozNFVUxGFIhbKgd1ksprsoDGMinTOTA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1152,9 +1152,9 @@
}
},
"node_modules/@eslint/core": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz",
"integrity": "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==",
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz",
"integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -1226,9 +1226,9 @@
"license": "MIT"
},
"node_modules/@eslint/js": {
"version": "9.19.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.19.0.tgz",
"integrity": "sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==",
"version": "9.20.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz",
"integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1259,6 +1259,19 @@
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/plugin-kit/node_modules/@eslint/core": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz",
"integrity": "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@types/json-schema": "^7.0.15"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@humanfs/core": {
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
@@ -1326,9 +1339,9 @@
}
},
"node_modules/@iconify-json/simple-icons": {
"version": "1.2.23",
"resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.2.23.tgz",
"integrity": "sha512-ySyZ0ZXdNveWnR71t7XGV7jhknxSlTtpM2TyIR1cUHTUzZLP36hYHTNqb2pYYsCzH5ed85KTTKz7vYT33FyNIQ==",
"version": "1.2.24",
"resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.2.24.tgz",
"integrity": "sha512-06ZWXZx3PHCE+02zn+iIGOKKNgE3kyPd0Yh7IUEIa0bCYI6UmGlsYYghRx8As9TnTNYMCEiy5V0zI4Jb6EY6XA==",
"dev": true,
"license": "CC0-1.0",
"dependencies": {
@@ -1417,9 +1430,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.4.tgz",
"integrity": "sha512-gGi5adZWvjtJU7Axs//CWaQbQd/vGy8KGcnEaCWiyCqxWYDxwIlAHFuSe6Guoxtd0SRvSfVTDMPd5H+4KE2kKA==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.6.tgz",
"integrity": "sha512-+GcCXtOQoWuC7hhX1P00LqjjIiS/iOouHXhMdiDSnq/1DGTox4SpUvO52Xm+div6+106r+TcvOeo/cxvyEyTgg==",
"cpu": [
"arm"
],
@@ -1431,9 +1444,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.4.tgz",
"integrity": "sha512-1aRlh1gqtF7vNPMnlf1vJKk72Yshw5zknR/ZAVh7zycRAGF2XBMVDAHmFQz/Zws5k++nux3LOq/Ejj1WrDR6xg==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.6.tgz",
"integrity": "sha512-E8+2qCIjciYUnCa1AiVF1BkRgqIGW9KzJeesQqVfyRITGQN+dFuoivO0hnro1DjT74wXLRZ7QF8MIbz+luGaJA==",
"cpu": [
"arm64"
],
@@ -1445,9 +1458,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.4.tgz",
"integrity": "sha512-drHl+4qhFj+PV/jrQ78p9ch6A0MfNVZScl/nBps5a7u01aGf/GuBRrHnRegA9bP222CBDfjYbFdjkIJ/FurvSQ==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.6.tgz",
"integrity": "sha512-z9Ib+OzqN3DZEjX7PDQMHEhtF+t6Mi2z/ueChQPLS/qUMKY7Ybn5A2ggFoKRNRh1q1T03YTQfBTQCJZiepESAg==",
"cpu": [
"arm64"
],
@@ -1459,9 +1472,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.4.tgz",
"integrity": "sha512-hQqq/8QALU6t1+fbNmm6dwYsa0PDD4L5r3TpHx9dNl+aSEMnIksHZkSO3AVH+hBMvZhpumIGrTFj8XCOGuIXjw==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.6.tgz",
"integrity": "sha512-PShKVY4u0FDAR7jskyFIYVyHEPCPnIQY8s5OcXkdU8mz3Y7eXDJPdyM/ZWjkYdR2m0izD9HHWA8sGcXn+Qrsyg==",
"cpu": [
"x64"
],
@@ -1473,9 +1486,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.4.tgz",
"integrity": "sha512-/L0LixBmbefkec1JTeAQJP0ETzGjFtNml2gpQXA8rpLo7Md+iXQzo9kwEgzyat5Q+OG/C//2B9Fx52UxsOXbzw==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.6.tgz",
"integrity": "sha512-YSwyOqlDAdKqs0iKuqvRHLN4SrD2TiswfoLfvYXseKbL47ht1grQpq46MSiQAx6rQEN8o8URtpXARCpqabqxGQ==",
"cpu": [
"arm64"
],
@@ -1487,9 +1500,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.4.tgz",
"integrity": "sha512-6Rk3PLRK+b8L/M6m/x6Mfj60LhAUcLJ34oPaxufA+CfqkUrDoUPQYFdRrhqyOvtOKXLJZJwxlOLbQjNYQcRQfw==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.6.tgz",
"integrity": "sha512-HEP4CgPAY1RxXwwL5sPFv6BBM3tVeLnshF03HMhJYCNc6kvSqBgTMmsEjb72RkZBAWIqiPUyF1JpEBv5XT9wKQ==",
"cpu": [
"x64"
],
@@ -1501,9 +1514,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.4.tgz",
"integrity": "sha512-kmT3x0IPRuXY/tNoABp2nDvI9EvdiS2JZsd4I9yOcLCCViKsP0gB38mVHOhluzx+SSVnM1KNn9k6osyXZhLoCA==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.6.tgz",
"integrity": "sha512-88fSzjC5xeH9S2Vg3rPgXJULkHcLYMkh8faix8DX4h4TIAL65ekwuQMA/g2CXq8W+NJC43V6fUpYZNjaX3+IIg==",
"cpu": [
"arm"
],
@@ -1515,9 +1528,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.4.tgz",
"integrity": "sha512-3iSA9tx+4PZcJH/Wnwsvx/BY4qHpit/u2YoZoXugWVfc36/4mRkgGEoRbRV7nzNBSCOgbWMeuQ27IQWgJ7tRzw==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.6.tgz",
"integrity": "sha512-wM4ztnutBqYFyvNeR7Av+reWI/enK9tDOTKNF+6Kk2Q96k9bwhDDOlnCUNRPvromlVXo04riSliMBs/Z7RteEg==",
"cpu": [
"arm"
],
@@ -1529,9 +1542,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.4.tgz",
"integrity": "sha512-7CwSJW+sEhM9sESEk+pEREF2JL0BmyCro8UyTq0Kyh0nu1v0QPNY3yfLPFKChzVoUmaKj8zbdgBxUhBRR+xGxg==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.6.tgz",
"integrity": "sha512-9RyprECbRa9zEjXLtvvshhw4CMrRa3K+0wcp3KME0zmBe1ILmvcVHnypZ/aIDXpRyfhSYSuN4EPdCCj5Du8FIA==",
"cpu": [
"arm64"
],
@@ -1543,9 +1556,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.4.tgz",
"integrity": "sha512-GZdafB41/4s12j8Ss2izofjeFXRAAM7sHCb+S4JsI9vaONX/zQ8cXd87B9MRU/igGAJkKvmFmJJBeeT9jJ5Cbw==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.6.tgz",
"integrity": "sha512-qTmklhCTyaJSB05S+iSovfo++EwnIEZxHkzv5dep4qoszUMX5Ca4WM4zAVUMbfdviLgCSQOu5oU8YoGk1s6M9Q==",
"cpu": [
"arm64"
],
@@ -1557,9 +1570,9 @@
]
},
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.4.tgz",
"integrity": "sha512-uuphLuw1X6ur11675c2twC6YxbzyLSpWggvdawTUamlsoUv81aAXRMPBC1uvQllnBGls0Qt5Siw8reSIBnbdqQ==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.6.tgz",
"integrity": "sha512-4Qmkaps9yqmpjY5pvpkfOerYgKNUGzQpFxV6rnS7c/JfYbDSU0y6WpbbredB5cCpLFGJEqYX40WUmxMkwhWCjw==",
"cpu": [
"loong64"
],
@@ -1571,9 +1584,9 @@
]
},
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.4.tgz",
"integrity": "sha512-KvLEw1os2gSmD6k6QPCQMm2T9P2GYvsMZMRpMz78QpSoEevHbV/KOUbI/46/JRalhtSAYZBYLAnT9YE4i/l4vg==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.6.tgz",
"integrity": "sha512-Zsrtux3PuaxuBTX/zHdLaFmcofWGzaWW1scwLU3ZbW/X+hSsFbz9wDIp6XvnT7pzYRl9MezWqEqKy7ssmDEnuQ==",
"cpu": [
"ppc64"
],
@@ -1585,9 +1598,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.4.tgz",
"integrity": "sha512-wcpCLHGM9yv+3Dql/CI4zrY2mpQ4WFergD3c9cpRowltEh5I84pRT/EuHZsG0In4eBPPYthXnuR++HrFkeqwkA==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.6.tgz",
"integrity": "sha512-aK+Zp+CRM55iPrlyKiU3/zyhgzWBxLVrw2mwiQSYJRobCURb781+XstzvA8Gkjg/hbdQFuDw44aUOxVQFycrAg==",
"cpu": [
"riscv64"
],
@@ -1599,9 +1612,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.4.tgz",
"integrity": "sha512-nLbfQp2lbJYU8obhRQusXKbuiqm4jSJteLwfjnunDT5ugBKdxqw1X9KWwk8xp1OMC6P5d0WbzxzhWoznuVK6XA==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.6.tgz",
"integrity": "sha512-WoKLVrY9ogmaYPXwTH326+ErlCIgMmsoRSx6bO+l68YgJnlOXhygDYSZe/qbUJCSiCiZAQ+tKm88NcWuUXqOzw==",
"cpu": [
"s390x"
],
@@ -1613,9 +1626,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.4.tgz",
"integrity": "sha512-JGejzEfVzqc/XNiCKZj14eb6s5w8DdWlnQ5tWUbs99kkdvfq9btxxVX97AaxiUX7xJTKFA0LwoS0KU8C2faZRg==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.6.tgz",
"integrity": "sha512-Sht4aFvmA4ToHd2vFzwMFaQCiYm2lDFho5rPcvPBT5pCdC+GwHG6CMch4GQfmWTQ1SwRKS0dhDYb54khSrjDWw==",
"cpu": [
"x64"
],
@@ -1627,9 +1640,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.4.tgz",
"integrity": "sha512-/iFIbhzeyZZy49ozAWJ1ZR2KW6ZdYUbQXLT4O5n1cRZRoTpwExnHLjlurDXXPKEGxiAg0ujaR9JDYKljpr2fDg==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.6.tgz",
"integrity": "sha512-zmmpOQh8vXc2QITsnCiODCDGXFC8LMi64+/oPpPx5qz3pqv0s6x46ps4xoycfUiVZps5PFn1gksZzo4RGTKT+A==",
"cpu": [
"x64"
],
@@ -1641,9 +1654,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.4.tgz",
"integrity": "sha512-qORc3UzoD5UUTneiP2Afg5n5Ti1GAW9Gp5vHPxzvAFFA3FBaum9WqGvYXGf+c7beFdOKNos31/41PRMUwh1tpA==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.6.tgz",
"integrity": "sha512-3/q1qUsO/tLqGBaD4uXsB6coVGB3usxw3qyeVb59aArCgedSF66MPdgRStUd7vbZOsko/CgVaY5fo2vkvPLWiA==",
"cpu": [
"arm64"
],
@@ -1655,9 +1668,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.4.tgz",
"integrity": "sha512-5g7E2PHNK2uvoD5bASBD9aelm44nf1w4I5FEI7MPHLWcCSrR8JragXZWgKPXk5i2FU3JFfa6CGZLw2RrGBHs2Q==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.6.tgz",
"integrity": "sha512-oLHxuyywc6efdKVTxvc0135zPrRdtYVjtVD5GUm55I3ODxhU/PwkQFD97z16Xzxa1Fz0AEe4W/2hzRtd+IfpOA==",
"cpu": [
"ia32"
],
@@ -1669,9 +1682,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.4.tgz",
"integrity": "sha512-p0scwGkR4kZ242xLPBuhSckrJ734frz6v9xZzD+kHVYRAkSUmdSLCIJRfql6H5//aF8Q10K+i7q8DiPfZp0b7A==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.6.tgz",
"integrity": "sha512-0PVwmgzZ8+TZ9oGBmdZoQVXflbvuwzN/HRclujpl4N/q3i+y0lqLw8n1bXA8ru3sApDjlmONaNAuYr38y1Kr9w==",
"cpu": [
"x64"
],
@@ -1683,78 +1696,78 @@
]
},
"node_modules/@shikijs/core": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-2.3.1.tgz",
"integrity": "sha512-u9WTI0CgQUicTJjkHoJbZosxLP2AlBPr8RV3cuh4SQDsXYqMomjnAoo4lZSqVq8a8kpMwyv/LqoSrg69dH0ZeA==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-2.3.2.tgz",
"integrity": "sha512-s7vyL3LzUKm3Qwf36zRWlavX9BQMZTIq9B1almM63M5xBuSldnsTHCmsXzoF/Kyw4k7Xgas7yAyJz9VR/vcP1A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@shikijs/engine-javascript": "2.3.1",
"@shikijs/engine-oniguruma": "2.3.1",
"@shikijs/types": "2.3.1",
"@shikijs/engine-javascript": "2.3.2",
"@shikijs/engine-oniguruma": "2.3.2",
"@shikijs/types": "2.3.2",
"@shikijs/vscode-textmate": "^10.0.1",
"@types/hast": "^3.0.4",
"hast-util-to-html": "^9.0.4"
}
},
"node_modules/@shikijs/engine-javascript": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-2.3.1.tgz",
"integrity": "sha512-sZLM4utrD1D28ENLtVS1+b7TIf1OIr3Gt0gLejMIG69lmFQI8mY0eGBdvbuvvM3Ys2M0kNYJF6BaWct27PggHw==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-2.3.2.tgz",
"integrity": "sha512-w3IEMu5HfL/OaJTsMbIfZ1HRPnWVYRANeDtmsdIIEgUOcLjzFJFQwlnkckGjKHekEzNqlMLbgB/twnfZ/EEAGg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@shikijs/types": "2.3.1",
"@shikijs/types": "2.3.2",
"@shikijs/vscode-textmate": "^10.0.1",
"oniguruma-to-es": "^3.1.0"
}
},
"node_modules/@shikijs/engine-oniguruma": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-2.3.1.tgz",
"integrity": "sha512-UKJEMht1gkF2ROigCgb3FE2ssmbR8CJEwUneImJ2QoZqayH/96Vp88p2N+RmyqJEHo1rsOivlJKeU9shhKpfSA==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-2.3.2.tgz",
"integrity": "sha512-vikMY1TroyZXUHIXbMnvY/mjtOxMn+tavcfAeQPgWS9FHcgFSUoEtywF5B5sOLb9NXb8P2vb7odkh3nj15/00A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@shikijs/types": "2.3.1",
"@shikijs/types": "2.3.2",
"@shikijs/vscode-textmate": "^10.0.1"
}
},
"node_modules/@shikijs/langs": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-2.3.1.tgz",
"integrity": "sha512-3csAX8RGm2EQCbpCb1Eq+r4DSpkku6gxb4jiHnOxlV4D36VYZsmunUiDo/4NZvpFA0CW33v/JoYmFJ3yQ2TvSw==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-2.3.2.tgz",
"integrity": "sha512-UqI6bSxFzhexIJficZLKeB1L2Sc3xoNiAV0yHpfbg5meck93du+EKQtsGbBv66Ki53XZPhnR/kYkOr85elIuFw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@shikijs/types": "2.3.1"
"@shikijs/types": "2.3.2"
}
},
"node_modules/@shikijs/themes": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-2.3.1.tgz",
"integrity": "sha512-QtkIM4Vz166+m4KED7/U5iVpgAdhfsHqMbBbjIzdTyTM1GIk2XQLcaB9b/LQY0y83Zl4lg7A7Hg+FT8+vAGL5A==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-2.3.2.tgz",
"integrity": "sha512-QAh7D/hhfYKHibkG2tti8vxNt3ekAH5EqkXJeJbTh7FGvTCWEI7BHqNCtMdjFvZ0vav5nvUgdvA7/HI7pfsB4w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@shikijs/types": "2.3.1"
"@shikijs/types": "2.3.2"
}
},
"node_modules/@shikijs/transformers": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-2.3.1.tgz",
"integrity": "sha512-f+ylRE6IFBpy0uovip1HpIlq2vqfZCkurtwYvwk0OEIPKbRR1e90n9QQdFcNgWIGBkmmPlz/FFx60nIHJTjanA==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-2.3.2.tgz",
"integrity": "sha512-2HDnJumw8A/9GecRpTgvfqSbPjEbJ4DPWq5J++OVP1gNMLvbV0MqFsP4canqRNM1LqB7VmWY45Stipb0ZIJ+0A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@shikijs/core": "2.3.1",
"@shikijs/types": "2.3.1"
"@shikijs/core": "2.3.2",
"@shikijs/types": "2.3.2"
}
},
"node_modules/@shikijs/types": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@shikijs/types/-/types-2.3.1.tgz",
"integrity": "sha512-1BQV6R4zF4pDPpPTbML8mPFX6RsNYtROfhgPT2YX+KW4B99a2UNtwuvmNj03BRy/sDz9GeAx9gAmnv8NroS/2w==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@shikijs/types/-/types-2.3.2.tgz",
"integrity": "sha512-CBaMY+a3pepyC4SETi7+bSzO0f6hxEQJUUuS4uD7zppzjmrN4ZRtBqxaT+wOan26CR9eeJ5iBhc4qvWEwn7Eeg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2504,25 +2517,25 @@
}
},
"node_modules/algoliasearch": {
"version": "5.20.1",
"resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.20.1.tgz",
"integrity": "sha512-SiCOCVBCQUg/aWkfMnjT+8TQxNNFlPZTI7v8y4+aZXzJg6zDIzKy9KcYVS4sc+xk5cwW5hyJ+9z836f4+wvgzA==",
"version": "5.20.2",
"resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.20.2.tgz",
"integrity": "sha512-8evxG++iWyWnhng3g5RP+kwn6j+2vKLfew8pVoekn87FcfsDm92zJXKwSrU6pl+m5eAbGFhFF/gCYEQiRdbPlA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@algolia/client-abtesting": "5.20.1",
"@algolia/client-analytics": "5.20.1",
"@algolia/client-common": "5.20.1",
"@algolia/client-insights": "5.20.1",
"@algolia/client-personalization": "5.20.1",
"@algolia/client-query-suggestions": "5.20.1",
"@algolia/client-search": "5.20.1",
"@algolia/ingestion": "1.20.1",
"@algolia/monitoring": "1.20.1",
"@algolia/recommend": "5.20.1",
"@algolia/requester-browser-xhr": "5.20.1",
"@algolia/requester-fetch": "5.20.1",
"@algolia/requester-node-http": "5.20.1"
"@algolia/client-abtesting": "5.20.2",
"@algolia/client-analytics": "5.20.2",
"@algolia/client-common": "5.20.2",
"@algolia/client-insights": "5.20.2",
"@algolia/client-personalization": "5.20.2",
"@algolia/client-query-suggestions": "5.20.2",
"@algolia/client-search": "5.20.2",
"@algolia/ingestion": "1.20.2",
"@algolia/monitoring": "1.20.2",
"@algolia/recommend": "5.20.2",
"@algolia/requester-browser-xhr": "5.20.2",
"@algolia/requester-fetch": "5.20.2",
"@algolia/requester-node-http": "5.20.2"
},
"engines": {
"node": ">= 14.0.0"
@@ -3856,18 +3869,18 @@
}
},
"node_modules/eslint": {
"version": "9.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.19.0.tgz",
"integrity": "sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA==",
"version": "9.20.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.0.tgz",
"integrity": "sha512-aL4F8167Hg4IvsW89ejnpTwx+B/UQRzJPGgbIOl+4XqffWsahVVsLEWoZvnrVuwpWmnRd7XeXmQI1zlKcFDteA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.12.1",
"@eslint/config-array": "^0.19.0",
"@eslint/core": "^0.10.0",
"@eslint/core": "^0.11.0",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "9.19.0",
"@eslint/js": "9.20.0",
"@eslint/plugin-kit": "^0.2.5",
"@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
@@ -5758,9 +5771,9 @@
}
},
"node_modules/postcss": {
"version": "8.5.1",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz",
"integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==",
"version": "8.5.2",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.2.tgz",
"integrity": "sha512-MjOadfU3Ys9KYoX0AdkBlFEF1Vx37uCCeN4ZHnmwm9FfpbsGWMZeBLMmmpY+6Ocqod7mkdZ0DT31OlbsFrLlkA==",
"dev": true,
"funding": [
{
@@ -5822,9 +5835,9 @@
}
},
"node_modules/prettier": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz",
"integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==",
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.0.tgz",
"integrity": "sha512-quyMrVt6svPS7CjQ9gKb3GLEX/rl3BCL2oa/QkNcXv4YNVBC9olt3s+H7ukto06q7B1Qz46PbrKLO34PR6vXcA==",
"dev": true,
"license": "MIT",
"bin": {
@@ -5973,9 +5986,9 @@
"license": "Unlicense"
},
"node_modules/rollup": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.4.tgz",
"integrity": "sha512-spF66xoyD7rz3o08sHP7wogp1gZ6itSq22SGa/IZTcUDXDlOyrShwMwkVSB+BUxFRZZCUYqdb3KWDEOMVQZxuw==",
"version": "4.34.6",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.6.tgz",
"integrity": "sha512-wc2cBWqJgkU3Iz5oztRkQbfVkbxoz5EhnCGOrnJvnLnQ7O0WhQUYyv18qQI79O8L7DdHrrlJNeCHd4VGpnaXKQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5989,25 +6002,25 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.34.4",
"@rollup/rollup-android-arm64": "4.34.4",
"@rollup/rollup-darwin-arm64": "4.34.4",
"@rollup/rollup-darwin-x64": "4.34.4",
"@rollup/rollup-freebsd-arm64": "4.34.4",
"@rollup/rollup-freebsd-x64": "4.34.4",
"@rollup/rollup-linux-arm-gnueabihf": "4.34.4",
"@rollup/rollup-linux-arm-musleabihf": "4.34.4",
"@rollup/rollup-linux-arm64-gnu": "4.34.4",
"@rollup/rollup-linux-arm64-musl": "4.34.4",
"@rollup/rollup-linux-loongarch64-gnu": "4.34.4",
"@rollup/rollup-linux-powerpc64le-gnu": "4.34.4",
"@rollup/rollup-linux-riscv64-gnu": "4.34.4",
"@rollup/rollup-linux-s390x-gnu": "4.34.4",
"@rollup/rollup-linux-x64-gnu": "4.34.4",
"@rollup/rollup-linux-x64-musl": "4.34.4",
"@rollup/rollup-win32-arm64-msvc": "4.34.4",
"@rollup/rollup-win32-ia32-msvc": "4.34.4",
"@rollup/rollup-win32-x64-msvc": "4.34.4",
"@rollup/rollup-android-arm-eabi": "4.34.6",
"@rollup/rollup-android-arm64": "4.34.6",
"@rollup/rollup-darwin-arm64": "4.34.6",
"@rollup/rollup-darwin-x64": "4.34.6",
"@rollup/rollup-freebsd-arm64": "4.34.6",
"@rollup/rollup-freebsd-x64": "4.34.6",
"@rollup/rollup-linux-arm-gnueabihf": "4.34.6",
"@rollup/rollup-linux-arm-musleabihf": "4.34.6",
"@rollup/rollup-linux-arm64-gnu": "4.34.6",
"@rollup/rollup-linux-arm64-musl": "4.34.6",
"@rollup/rollup-linux-loongarch64-gnu": "4.34.6",
"@rollup/rollup-linux-powerpc64le-gnu": "4.34.6",
"@rollup/rollup-linux-riscv64-gnu": "4.34.6",
"@rollup/rollup-linux-s390x-gnu": "4.34.6",
"@rollup/rollup-linux-x64-gnu": "4.34.6",
"@rollup/rollup-linux-x64-musl": "4.34.6",
"@rollup/rollup-win32-arm64-msvc": "4.34.6",
"@rollup/rollup-win32-ia32-msvc": "4.34.6",
"@rollup/rollup-win32-x64-msvc": "4.34.6",
"fsevents": "~2.3.2"
}
},
@@ -6083,18 +6096,18 @@
}
},
"node_modules/shiki": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-2.3.1.tgz",
"integrity": "sha512-bD1XuVAyZBVxHiPlO/m2nM2F5g8G5MwSZHNYx+ArpcOW52+fCN6peGP5gG61O0gZpzUVbImeR3ar8cF+Z5WM8g==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-2.3.2.tgz",
"integrity": "sha512-UZhz/gsUz7DHFbQBOJP7eXqvKyYvMGramxQiSDc83M/7OkWm6OdVHAReEc3vMLh6L6TRhgL9dvhXz9XDkCDaaw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@shikijs/core": "2.3.1",
"@shikijs/engine-javascript": "2.3.1",
"@shikijs/engine-oniguruma": "2.3.1",
"@shikijs/langs": "2.3.1",
"@shikijs/themes": "2.3.1",
"@shikijs/types": "2.3.1",
"@shikijs/core": "2.3.2",
"@shikijs/engine-javascript": "2.3.2",
"@shikijs/engine-oniguruma": "2.3.2",
"@shikijs/langs": "2.3.2",
"@shikijs/themes": "2.3.2",
"@shikijs/types": "2.3.2",
"@shikijs/vscode-textmate": "^10.0.1",
"@types/hast": "^3.0.4"
}
@@ -6255,9 +6268,9 @@
}
},
"node_modules/stylis": {
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.5.tgz",
"integrity": "sha512-K7npNOKGRYuhAFFzkzMGfxFDpN6gDwf8hcMiE+uveTVbBgm93HrNP3ZDUpKqzZ4pG7TP6fmb+EMAQPjq9FqqvA==",
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz",
"integrity": "sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ==",
"dev": true,
"license": "MIT",
"peer": true
@@ -6852,9 +6865,9 @@
}
},
"node_modules/vue-md-parser": {
"version": "1.0.15",
"resolved": "https://registry.npmjs.org/vue-md-parser/-/vue-md-parser-1.0.15.tgz",
"integrity": "sha512-umecKNZqKLaqchOqjigiXfrezYDrvwZbQYJuXqkowYSSvSzexoHhiLcd7SclSaqxdbrET1yc430zk0YhcskPAw==",
"version": "1.0.27",
"resolved": "https://registry.npmjs.org/vue-md-parser/-/vue-md-parser-1.0.27.tgz",
"integrity": "sha512-10oR6POiuaMr6ci+UgnxZqFERguNqLnSEiYw7AgBt4TViSSAc4iSLe+dNNx6aojSSJ2WOtVjGHlv4Jt9gsRcpQ==",
"dev": true,
"license": "MIT",
"dependencies": {
+3 -2
View File
@@ -24,7 +24,7 @@
"lint-staged": "^15.4.3",
"prettier": "^3.4.2",
"vitepress": "^1.6.3",
"vue-md-parser": "^1.0.15"
"vue-md-parser": "^1.0.27"
},
"lint-staged": {
"*.{js,ts,vue}": [
@@ -33,7 +33,8 @@
],
"*.py": [
"env/scripts/black ./src/back",
"env/scripts/pylint"
"env/scripts/pylint --load-plugins=pylint_django --django-settings-module=portal.settings --disable=C0114"
]
},
"dependencies": {
+297 -121
View File
@@ -1,48 +1,70 @@
from rest_framework.views import APIView
from rest_framework.response import Response
from django.db.models import Count
from django.db.models import Q
from .models import *
from userauth.models import *
from .serializers import *
from datetime import datetime
from rest_framework import generics
from navigation.models import News
import json
from collections import defaultdict
import os
from django.conf import settings
from django.urls import reverse
import html
from datetime import datetime, timezone
from collections import defaultdict
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import generics
from django.db import DatabaseError
from django.db.models import Count
from accounts.models import User
from navigation.models import News
from userauth.models import DictDepartment, DictEmployee, EmployeeDepartment
from .models import Vote, Answer, Question, Result
from .serializers import (
VoteSerializer,
VotesSerializer,
DictEmployeeSerializer,
ResultSerializer,
)
class GetVotes(APIView):
"""
Комментарий
"""
def get(self, request):
"""
Комментарий
"""
user = request.user
# user = User.objects.get(username='9966-00-125')
now = datetime.now()
status = request.query_params.get('status')
#
status = request.query_params.get("status")
votes = self.get_votes_by_status(status, now)
serialized_votes = VotesSerializer(votes, many=True).data
questions_by_vote_id = self.get_questions_by_vote_id(votes)
self.enrich_votes(serialized_votes, questions_by_vote_id, user)
return Response(serialized_votes)
def get_votes_by_status(self, status, now):
"""
Комментарий
"""
print(status)
if status is None:
return Vote.objects.all().order_by('dateend')
return Vote.objects.all().order_by("dateend")
status_filters = {
'active': Vote.objects.filter(dateend__gt=now),
'completed': Vote.objects.filter(dateend__lt=now),
"active": Vote.objects.filter(dateend__gt=now),
"completed": Vote.objects.filter(dateend__lt=now),
}
return status_filters.get(status, Vote.objects.none()).order_by('dateend')
return status_filters.get(status, Vote.objects.none()).order_by("dateend")
def get_questions_by_vote_id(self, votes):
"""
Комментарий
"""
questions = Question.objects.filter(vote__in=votes)
questions_by_vote_id = defaultdict(list)
@@ -51,232 +73,386 @@ class GetVotes(APIView):
return questions_by_vote_id
def enrich_votes(self, serialized_votes, questions_by_vote_id, user):
"""
Комментарий
"""
for vote in serialized_votes:
vote['is_passed'] = self.has_participated(user, vote['id'])
related_questions = questions_by_vote_id[vote['id']]
vote['files'] = [question.file.url for question in related_questions if question.file]
vote["is_passed"] = self.has_participated(user, vote["id"])
related_questions = questions_by_vote_id[vote["id"]]
vote["files"] = [
question.file.url for question in related_questions if question.file
]
def has_participated(self, employee, vote):
return Result.objects.filter(user=employee, answer__question__vote=vote).exists()
"""
Комментарий
"""
return Result.objects.filter(
user=employee, answer__question__vote=vote
).exists()
class VoteDetail(generics.RetrieveUpdateDestroyAPIView):
"""
Комментарий
"""
queryset = Vote.objects.all()
serializer_class = VoteSerializer
lookup_url_kwarg = 'id'
lookup_field = 'id'
lookup_url_kwarg = "id"
lookup_field = "id"
def get(self, request, *args, **kwargs):
"""
Комментарий
"""
# if self.check_user_vote(kwargs['id'], User.objects.get(username='9966-00-125')):
if self.check_user_vote(kwargs['id'], request.user):
return Response({'status': 'error', 'message': 'voted'}, status=400)
vote = self.get_vote(kwargs['id'])
if self.check_user_vote(kwargs["id"], request.user):
return Response({"status": "error", "message": "voted"}, status=400)
vote = self.get_vote(kwargs["id"])
if isinstance(vote, Response):
return vote
answers_employee = self.get_employee_answers(vote)
answers_names = [item['name'] for item in answers_employee]
answers_names = [item["name"] for item in answers_employee]
employee_dict = self.serialize_employees(answers_names)
serialized_data = self.retrieve(request, *args, **kwargs).data
self.add_employee_info(serialized_data, answers_employee, answers_names, employee_dict)
self.add_employee_info(
serialized_data, answers_employee, answers_names, employee_dict
)
return Response(serialized_data)
def check_user_vote(self, vote_id, user):
"""
Комментарий
"""
results = Result.objects.filter(answer__question__vote=vote_id, user=user)
return results.exists()
def get_vote(self, vote_id):
"""
Получить незавершенное голосование
"""
try:
vote = Vote.objects.get(id=vote_id)
if vote.dateend < datetime.now(timezone.utc):
return Response({'status': 'error', 'message': 'Voting is over'}, status=400)
return Response(
{"status": "error", "message": "Voting is over"}, status=400
)
return vote
except Exception as e:
return Response({'status': 'error', 'message': str(e)}, status=400)
except Vote.DoesNotExist as e:
return Response({"status": "error", "message": str(e)}, status=400)
def get_employee_answers(self, vote):
return Answer.objects.filter(question__vote=vote).filter(question__settings__choice="employee").values('name', 'question')
"""
Комментарий
"""
return (
Answer.objects.filter(question__vote=vote)
.filter(question__settings__choice="employee")
.values("name", "question")
)
def serialize_employees(self, answers_names):
"""
Комментарий
"""
employees_serializer = get_employees_serializer(answers_names)
return {employee['id']: employee for employee in employees_serializer}
def add_employee_info(self, serialized_data, answers_employee, answers_names, employee_dict):
return {employee["id"]: employee for employee in employees_serializer}
question_ids = [item['question'] for item in answers_employee]
def add_employee_info(
self, serialized_data, answers_employee, answers_names, employee_dict
):
"""
Комментарий
"""
question_ids = [item["question"] for item in answers_employee]
for question in serialized_data["questions"]:
for answer in question["answers"]:
if question["id"] in question_ids:
if answer["name"] in answers_names:
answer["employee"] = employee_dict.get(int(answer["name"]))
for question in serialized_data['questions']:
for answer in question['answers']:
if question['id'] in question_ids:
if answer['name'] in answers_names:
answer['employee'] = employee_dict.get(int(answer['name']))
class VoteCreate(APIView):
"""
Комментарий
"""
def post(self, request):
"""
Комментарий
"""
try:
vote = self.create_vote(request)
if request.data.get('news') == 'true':
if request.data.get("news") == "true":
self.create_news(request, vote)
return Response({'status': 'success', 'message': 'Vote and news created successfully.'}, status=200)
except Exception as e:
return Response(
{"status": "success", "message": "Vote and news created successfully."},
status=200,
)
except ValueError as e:
return Response({"status": "error", "message": str(e)}, status=400)
except DatabaseError as e:
print(e)
return Response({'status': 'error', 'message': str(e)}, status=400)
return Response({"status": "error", "message": str(e)}, status=400)
def create_vote(self, request):
"""
Комментарий
"""
user = request.user
vote = Vote.objects.create(
name=request.data['title'],
description=request.data['description'],
datestart=request.data['startDate'],
dateend=request.data['endDate'],
name=request.data["title"],
description=request.data["description"],
datestart=request.data["startDate"],
dateend=request.data["endDate"],
author=user,
)
questions_files = {file.name: file for file in request.FILES.getlist('questionsfiles')}
answers_files = {file.name: file for file in request.FILES.getlist('answersfiles')}
questions_files = {
file.name: file for file in request.FILES.getlist("questionsfiles")
}
answers_files = {
file.name: file for file in request.FILES.getlist("answersfiles")
}
questions = json.loads(request.data['questions'])
questions = json.loads(request.data["questions"])
for count, question_data in enumerate(questions, start=1):
question_image = questions_files.get(question_data['image']['name']) if 'image' in question_data and question_data['image'] is not None else None
question_image = (
questions_files.get(question_data["image"]["name"])
if "image" in question_data and question_data["image"] is not None
else None
)
question = Question.objects.create(
name=question_data['text'],
name=question_data["text"],
vote=vote,
file=question_image,
numb=count,
settings=question_data.get('settings', {}),
settings=question_data.get("settings", {}),
)
for answer in question_data['answers']:
answer_image = answers_files.get(answer['image']['name']) if 'image' in answer and answer['image'] is not None else None
for answer in question_data["answers"]:
answer_image = (
answers_files.get(answer["image"]["name"])
if "image" in answer and answer["image"] is not None
else None
)
Answer.objects.create(
name=answer['text'],
file=answer_image,
question=question
name=answer["text"], file=answer_image, question=question
)
return vote
def create_news(self, request, vote):
"""
Комментарий
"""
formatted_date = datetime.strptime(request.data["endDate"][:-1], "%Y-%m-%dT%H:%M:%S.%f").strftime("%d.%m.%Y %H:%M")
vote_url = make_clickable(request.data['title'], f"/vote/voting/{vote.id}")
formatted_date = datetime.strptime(
request.data["endDate"][:-1], "%Y-%m-%dT%H:%M:%S.%f"
).strftime("%d.%m.%Y %H:%M")
vote_url = make_clickable(request.data["title"], f"/vote/voting/{vote.id}")
news = News(
title = 'Пройдите голосование!',
text = f'Пройдите голосование "{vote_url}" до {formatted_date}',
cdate = request.data['startDate'],
author = request.user,
link = os.path.join('defaultimg','vote.png'),
title="Пройдите голосование!",
text=f'Пройдите голосование "{vote_url}" до {formatted_date}',
cdate=request.data["startDate"],
author=request.user,
link=os.path.join("defaultimg", "vote.png"),
)
news.save()
vote.news = news
vote.save()
vote.save()
def make_clickable(text, url):
"""
Комментарий
"""
text = html.escape(text)
anchor = f'<a href="{html.escape(url)}">{text}</a>'
return anchor
class GetDictEmployee(APIView):
"""
Комментарий
"""
def get(self, request):
"""
Комментарий
"""
employees = DictEmployee.objects.filter(deleted=0)
set_real_departments(employees)
employees_serializer = DictEmployeeSerializer(employees, many=True).data
return Response(employees_serializer)
class GetResults(APIView):
"""
Комментарий
"""
def get(self, request):
vote_id = request.GET.get('id')
"""
Комментарий
"""
vote_id = request.GET.get("id")
vote = self.get_vote(vote_id)
if isinstance(vote, Response):
if isinstance(vote, Response):
return vote
serialized_data = VoteSerializer(vote).data
answers_employee = self.get_employee_answers(vote)
answers_names = [item['name'] for item in answers_employee]
answers_names = [item["name"] for item in answers_employee]
employee_dict = self.create_employee_dict(answers_names)
result_dict = self.get_answer_counts(vote)
self.add_employee_info(serialized_data, answers_employee, answers_names, employee_dict, result_dict)
self.add_employee_info(
{
"serialized_data": serialized_data,
**{answers_employee, answers_names, employee_dict, result_dict},
}
)
serialized_data['nonvoting'] = self.get_non_voting_employees(vote)
serialized_data["nonvoting"] = self.get_non_voting_employees(vote)
return Response(serialized_data)
def get_vote(self, vote_id):
"""
Комментарий
"""
try:
vote = Vote.objects.get(id=vote_id)
return vote
except Vote.DoesNotExist:
return Response({'status': 'error', 'message': 'Vote not found'}, status=404)
return Response(
{"status": "error", "message": "Vote not found"}, status=404
)
def get_employee_answers(self, vote):
"""
Комментарий
"""
answers_employee = Answer.objects.filter(
question__vote=vote,
question__settings__choice="employee"
).values('name', 'question')
question__vote=vote, question__settings__choice="employee"
).values("name", "question")
return answers_employee
def create_employee_dict(self, answers_names):
"""
Комментарий
"""
if not answers_names:
return {}
employees_serializer = get_employees_serializer(answers_names)
return {employee['id']: employee for employee in employees_serializer}
def get_answer_counts(self, vote):
results = Result.objects.filter(
answer__question__vote=vote
).values('answer_id').annotate(count=Count('id'))
return {int(result['answer_id']): result['count'] for result in results}
def add_employee_info(self, serialized_data, answers_employee, answers_names, employee_dict, result_dict):
question_ids = [item['question'] for item in answers_employee]
for question in serialized_data['questions']:
for answer in question['answers']:
answer['count'] = result_dict.get(int(answer['id']), 0)
if question['id'] in question_ids:
if answer['name'] in answers_names:
answer['employee'] = employee_dict.get(int(answer['name']))
employees_serializer = get_employees_serializer(answers_names)
return {employee["id"]: employee for employee in employees_serializer}
def get_answer_counts(self, vote):
"""
Комментарий
"""
results = (
Result.objects.filter(answer__question__vote=vote)
.values("answer_id")
.annotate(count=Count("id"))
)
return {int(result["answer_id"]): result["count"] for result in results}
def add_employee_info(self, info):
"""
info ={serialized_data, answers_employee, answers_names, employee_dict, result_dict}
Комментарий
"""
serialized_data = info.get("serialized_data")
answers_employee = info.get("answers_employee")
answers_names = info.get("answers_names")
employee_dict = info.get("employee_dict")
result_dict = info.get("result_dict")
question_ids = [item["question"] for item in answers_employee]
for question in serialized_data["questions"]:
for answer in question["answers"]:
answer["count"] = result_dict.get(int(answer["id"]), 0)
if question["id"] in question_ids:
if answer["name"] in answers_names:
answer["employee"] = employee_dict.get(int(answer["name"]))
def get_non_voting_employees(self, vote):
users = Result.objects.filter(answer__question__vote=vote).values('user_id')
non_voting_users = User.objects.filter(created_at__lt=vote.dateend).exclude(id__in=users)
employee_ids = non_voting_users.values_list('user_id', flat=True)
"""
Комментарий
"""
users = Result.objects.filter(answer__question__vote=vote).values("user_id")
non_voting_users = User.objects.filter(created_at__lt=vote.dateend).exclude(
id__in=users
)
employee_ids = non_voting_users.values_list("user_id", flat=True)
return get_employees_serializer(employee_ids)
class VoteResultCreate(generics.ListCreateAPIView):
"""
Комментарий
"""
queryset = Result.objects.all()
serializer_class = ResultSerializer
def create(self, request, *args, **kwargs):
"""
Комментарий
"""
serializer = self.get_serializer(data=request.data, many=True)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
def get_employees_serializer(ids):
"""
Комментарий
"""
employees = DictEmployee.objects.filter(id__in=ids)
set_real_departments(employees)
set_real_departments(employees)
employees_serializer = DictEmployeeSerializer(employees, many=True).data
return employees_serializer
def set_real_departments(employees):
"""
Комментарий
"""
employee_departments = EmployeeDepartment.objects.filter(employee__in=employees)
departments = DictDepartment.objects.in_bulk([ed.department.id for ed in employee_departments])
department_map = {ed.employee.id: {'name': ed.department.name, 'id': departments[ed.department.id]} for ed in employee_departments}
departments = DictDepartment.objects.in_bulk(
[ed.department.id for ed in employee_departments]
)
department_map = {
ed.employee.id: {
"name": ed.department.name,
"id": departments[ed.department.id],
}
for ed in employee_departments
}
for employee in employees:
if employee.id in department_map:
employee.department = department_map[employee.id]['name']
employee.id_dict_department = department_map[employee.id]['id']
employee.department = department_map[employee.id]["name"]
employee.id_dict_department = department_map[employee.id]["id"]
+68 -73
View File
@@ -1,32 +1,39 @@
import {useAccountStore} from '@/store/AccountStore'
import axios from "axios";
import { useAccountStore } from '@/store/AccountStore';
import axios from 'axios';
const spravURL = 'http://10.252.44.33/accounting6/images/photo/'
const spravURLBase = 'http://10.252.44.33/accounting6/'
const baseURL = process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:8000/' : `http://${window.location.host}/`;
const baseWS = process.env.NODE_ENV === 'development' ? 'ws://127.0.0.1:8000/' : `ws://${window.location.host}/`;
const spravURL = 'http://10.252.44.33/accounting6/images/photo/';
const spravURLBase = 'http://10.252.44.33/accounting6/';
const baseURL =
process.env.NODE_ENV === 'development'
? 'http://127.0.0.1:8000/'
: `http://${window.location.host}/`;
const baseWS =
process.env.NODE_ENV === 'development' ? 'ws://127.0.0.1:8000/' : `ws://${window.location.host}/`;
// const baseURL = process.env.NODE_ENV == 'development'? 'http://127.0.0.1:8000/': `http://10.252.44.60:9965/`;
// const baseWS = process.env.NODE_ENV == 'development'? 'ws://127.0.0.1:8000/': `ws://10.252.44.60:9966/`;
// для релизного меняем 'http://ukd/'
// const baseURL = 'http://127.0.0.1:8000/';
async function refreshToken() {
const refresh = localStorage.getItem('refresh');
try {
const result = await axios.post('/api/accounts/token/refresh/', {refresh}, {
baseURL
})
const result = await axios.post(
'/api/accounts/token/refresh/',
{ refresh },
{
baseURL,
},
);
if (result.config.data) localStorage.setItem('refresh', JSON.parse(result.config.data).refresh);
localStorage.setItem('access', result.data.access)
localStorage.setItem('access', result.data.access);
return result.data.access;
} catch (e) {
const accountStore = useAccountStore()
accountStore.logout()
accountStore.cod2user.value = false
const accountStore = useAccountStore();
accountStore.logout();
accountStore.cod2user.value = false;
return Promise.reject(e);
}
@@ -40,32 +47,36 @@ const clearAxios = axios.create({
baseURL,
});
axiosApiInstance.defaults.headers.common['Authorization'] = `Bearer ${localStorage.getItem('access')}`
axiosApiInstance.defaults.headers.common['Authorization'] =
`Bearer ${localStorage.getItem('access')}`;
axiosApiInstance.interceptors.request.use(config => {
const access = localStorage.getItem('access');
if (access) {
config.headers = {
'Authorization': `Bearer ${access}`,
axiosApiInstance.interceptors.request.use(
(config) => {
const access = localStorage.getItem('access');
if (access) {
config.headers = {
Authorization: `Bearer ${access}`,
};
}
}
return config;
}, error => {
return Promise.reject(error);
})
return config;
},
(error) => {
return Promise.reject(error);
},
);
axiosApiInstance.interceptors.response.use(
response => {
(response) => {
return response;
},
async error => {
async (error) => {
const originalRequest = error.config;
if ((error.response.status === 401 || error.response.status === 403) && !originalRequest._retry) {
if (
(error.response.status === 401 || error.response.status === 403) &&
!originalRequest._retry
) {
originalRequest._retry = true;
try {
const token = await refreshToken();
axiosApiInstance.defaults.headers.common['Authorization'] = `Bearer ${token}`;
@@ -75,64 +86,54 @@ axiosApiInstance.interceptors.response.use(
}
return axiosApiInstance(originalRequest);
} catch (e) {
return Promise.reject(error);
return Promise.reject(error) ?? e;
}
}
return Promise.reject(error);
})
},
);
async function getVotes(status) {
try {
const response = await axiosApiInstance.get(`/api/vote/getvotes?status=${status}`);
return response.data;
} catch (error) {
console.error('Ошибка запроса голосования:', error);
throw error;
throw new Error('Ошибка запроса голосования:', error);
}
}
async function createVote(voteData) {
try {
const formData = new FormData();
voteData.questions.forEach(question => {
formData.append('questionsfiles', question.image)
if(!!question.image){
const {name,size,lastModified}=question.image
question.image={name,size,lastModified}
voteData.questions.forEach((question) => {
formData.append('questionsfiles', question.image);
if (question.image) {
const { name, size, lastModified } = question.image;
question.image = { name, size, lastModified };
}
question.answers.forEach((answer) => {
formData.append('answersfiles', answer.image);
if (answer.image) {
const { name, size, lastModified } = answer.image;
answer.image = { name, size, lastModified };
}
question.answers.forEach(answer=>{
formData.append('answersfiles', answer.image)
if(!!answer.image){
const {name,size,lastModified}=answer.image
answer.image={name,size,lastModified}
}
})
});
});
formData.append('createnews', voteData.createnews);
formData.append('news', voteData.createnews);
formData.append('title', voteData.title);
formData.append('description', voteData.description);
formData.append('startDate', new Date(voteData.startDate).toISOString());
formData.append('endDate', new Date(voteData.endDate).toISOString());
formData.append('questions', JSON.stringify(voteData.questions));
const response = await axiosApiInstance.post('/api/vote/votecreate/', formData, {
headers: {'Content-Type': 'multipart/form-data'},
await axiosApiInstance.post('/api/vote/votecreate/', formData, {
headers: { 'Content-Type': 'multipart/form-data' },
});
// return response.data;
} catch (error) {
console.error('Ошибка создания голосования:', error);
throw error;
throw new Error(error);
}
}
@@ -141,8 +142,7 @@ async function getVoteDetail(id) {
const response = await axiosApiInstance.get(`/api/vote/votedetail/${id}/`);
return response.data;
} catch (error) {
console.error("Ошибка получения деталей голосования:", error);
throw error;
throw new Error(error);
}
}
@@ -169,10 +169,8 @@ async function getVoteDetail(id) {
async function deleteVote(id) {
try {
await axiosApiInstance.delete(`/api/vote/votedetail/${id}/`);
console.log("Голосование успешно удалено");
} catch (error) {
console.error("Ошибка удаления голосования:", error);
throw error;
throw new Error(error);
}
}
@@ -181,8 +179,7 @@ async function getEmployees() {
const response = await axiosApiInstance.get(`api/vote/getdictemployee/`);
return response.data;
} catch (error) {
console.error("Ошибка получения всех сотрудников:", error);
throw error;
throw new Error(error);
}
}
@@ -191,12 +188,10 @@ async function getVoteResult(id) {
const response = await axiosApiInstance.get(`/api/vote/getresults/?id=${id}`);
return response.data;
} catch (error) {
console.error("Ошибка получения результата голосования:", error);
throw error;
throw new Error(error);
}
}
export {
axiosApiInstance,
clearAxios,
@@ -212,4 +207,4 @@ export {
deleteVote,
getEmployees,
getVoteResult,
}
};