1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Починка добавления сотрудника6

This commit is contained in:
MoonTestUse1
2024-12-27 02:42:29 +06:00
parent 26243f74da
commit b0c4c8450c

View File

@@ -2,7 +2,7 @@
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { departments } from '@/utils/constants'; import { departments } from '@/utils/constants';
import type { Employee, EmployeeFormData } from '@/types/employee'; import type { Employee, EmployeeFormData } from '@/types/employee';
import EmployeeFormModal from './employee/EmployeeFormModal.vue'; import EmployeeForm from './EmployeeForm.vue';
const employees = ref<Employee[]>([]); const employees = ref<Employee[]>([]);
const showAddForm = ref(false); const showAddForm = ref(false);
@@ -121,11 +121,13 @@ onMounted(fetchEmployees);
</table> </table>
</div> </div>
<EmployeeFormModal <Teleport to="body">
<EmployeeForm
v-if="showAddForm || editingEmployee" v-if="showAddForm || editingEmployee"
:employee="editingEmployee || undefined" :employee="editingEmployee"
@close="closeForm" @close="closeForm"
@submit="handleSubmit" @submit="handleSubmit"
/> />
</Teleport>
</div> </div>
</template> </template>