mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
доработка модального окна в управлении сотрудникaa1
This commit is contained in:
20
frontend/.dockerignore
Normal file
20
frontend/.dockerignore
Normal file
@@ -0,0 +1,20 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
.gitignore
|
||||
README.md
|
||||
.env
|
||||
.env.*
|
||||
*.log
|
||||
.DS_Store
|
||||
coverage
|
||||
.vscode
|
||||
.idea
|
||||
*.md
|
||||
*.test.js
|
||||
*.spec.js
|
||||
__tests__
|
||||
tests
|
||||
test
|
||||
.npm
|
||||
.eslintcache
|
||||
@@ -113,8 +113,9 @@ export default {
|
||||
async fetchRequests() {
|
||||
this.isLoading = true
|
||||
try {
|
||||
console.log('Token:', localStorage.getItem('admin_token')) // Для отладки токена
|
||||
console.log('Fetching requests...') // Для отладки
|
||||
const response = await axios.get('/api/requests', {
|
||||
const response = await axios.get('/api/admin/requests', {
|
||||
headers: {
|
||||
Authorization: `Bearer ${localStorage.getItem('admin_token')}`
|
||||
},
|
||||
@@ -140,6 +141,13 @@ export default {
|
||||
requestsData = Array.isArray(response.data) ? response.data : []
|
||||
}
|
||||
|
||||
console.log('Requests data after processing:', requestsData) // Для отладки
|
||||
|
||||
if (requestsData.length === 0) {
|
||||
console.log('No requests found in the response') // Для отладки
|
||||
return
|
||||
}
|
||||
|
||||
// Получаем информацию о сотрудниках для отображения имен
|
||||
const employeesResponse = await axios.get('/api/employees', {
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user