From f7deeb414dccc6aab9e93eb59b809f5bc0d4c8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:49:20 +0300 Subject: [PATCH] =?UTF-8?q?Hr=20menus=C3=BCde=20kullan=C4=B1lan=20komponen?= =?UTF-8?q?tler=20silindi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/ListFormSeeder.cs | 2 +- .../Seeds/MenusData.json | 84 - .../Tenants/TenantDataSeeder.cs | 5 + .../components/common/MultiSelectEmployee.tsx | 2 +- .../hr/components/BadgeAssignmentModal.tsx | 336 --- ui/src/views/hr/components/BadgeEditModal.tsx | 426 --- .../views/hr/components/BadgeManagement.tsx | 446 --- .../hr/components/CostCenterFormModal.tsx | 291 -- .../hr/components/CostCenterManagement.tsx | 467 --- .../hr/components/CostCenterViewModal.tsx | 273 -- .../hr/components/Degree360Evaluation.tsx | 2666 ----------------- .../hr/components/Degree360Templates.tsx | 781 ----- .../hr/components/DepartmentFormModal.tsx | 296 -- .../hr/components/DepartmentManagement.tsx | 461 --- .../hr/components/DepartmentViewModal.tsx | 272 -- ui/src/views/hr/components/EmployeeCards.tsx | 182 -- ui/src/views/hr/components/EmployeeForm.tsx | 830 ----- ui/src/views/hr/components/EmployeeList.tsx | 564 ---- ui/src/views/hr/components/EmployeeView.tsx | 497 --- .../views/hr/components/EmploymentTypes.tsx | 454 --- .../hr/components/JobPositionFormModal.tsx | 484 --- .../hr/components/JobPositionViewModal.tsx | 226 -- ui/src/views/hr/components/JobPositions.tsx | 508 ---- .../views/project/components/ProjectForm.tsx | 2 +- 24 files changed, 8 insertions(+), 10547 deletions(-) delete mode 100644 ui/src/views/hr/components/BadgeAssignmentModal.tsx delete mode 100644 ui/src/views/hr/components/BadgeEditModal.tsx delete mode 100644 ui/src/views/hr/components/BadgeManagement.tsx delete mode 100644 ui/src/views/hr/components/CostCenterFormModal.tsx delete mode 100644 ui/src/views/hr/components/CostCenterManagement.tsx delete mode 100644 ui/src/views/hr/components/CostCenterViewModal.tsx delete mode 100644 ui/src/views/hr/components/Degree360Evaluation.tsx delete mode 100644 ui/src/views/hr/components/Degree360Templates.tsx delete mode 100644 ui/src/views/hr/components/DepartmentFormModal.tsx delete mode 100644 ui/src/views/hr/components/DepartmentManagement.tsx delete mode 100644 ui/src/views/hr/components/DepartmentViewModal.tsx delete mode 100644 ui/src/views/hr/components/EmployeeCards.tsx delete mode 100644 ui/src/views/hr/components/EmployeeForm.tsx delete mode 100644 ui/src/views/hr/components/EmployeeList.tsx delete mode 100644 ui/src/views/hr/components/EmployeeView.tsx delete mode 100644 ui/src/views/hr/components/EmploymentTypes.tsx delete mode 100644 ui/src/views/hr/components/JobPositionFormModal.tsx delete mode 100644 ui/src/views/hr/components/JobPositionViewModal.tsx delete mode 100644 ui/src/views/hr/components/JobPositions.tsx diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder.cs index cd80a4dd..63fceb47 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder.cs @@ -34291,7 +34291,7 @@ public class ListFormSeeder : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.Guid, FieldName = "EmploymentTypeId", - Width = 100, + Width = 200, ListOrderNo = 24, Visible = true, IsActive = true, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json index de12eddb..e8ddeddf 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json @@ -888,55 +888,6 @@ "routeType": "protected", "authority": null }, - { - "key": "admin.hr.employees", - "path": "/admin/hr/employees", - "componentPath": "@/views/hr/components/EmployeeList", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.employeesNew", - "path": "/admin/hr/employees/new", - "componentPath": "@/views/hr/components/EmployeeForm", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.employeesEdit", - "path": "/admin/hr/employees/edit/:id", - "componentPath": "@/views/hr/components/EmployeeForm", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.employeesDetail", - "path": "/admin/hr/employees/:id", - "componentPath": "@/views/hr/components/EmployeeView", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.departments", - "path": "/admin/hr/departments", - "componentPath": "@/views/hr/components/DepartmentManagement", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.jobPositions", - "path": "/admin/hr/job-positions", - "componentPath": "@/views/hr/components/JobPositions", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.employmentTypes", - "path": "/admin/hr/employment-types", - "componentPath": "@/views/hr/components/EmploymentTypes", - "routeType": "protected", - "authority": null - }, { "key": "admin.hr.organization", "path": "/admin/hr/organization", @@ -944,41 +895,6 @@ "routeType": "protected", "authority": null }, - { - "key": "admin.hr.badges", - "path": "/admin/hr/badges", - "componentPath": "@/views/hr/components/BadgeManagement", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.payroll", - "path": "/admin/hr/payroll", - "componentPath": "@/views/hr/components/PayrollManagement", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.costCenters", - "path": "/admin/hr/cost-centers", - "componentPath": "@/views/hr/components/CostCenterManagement", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.Template360s", - "path": "/admin/hr/360-templates", - "componentPath": "@/views/hr/components/Degree360Templates", - "routeType": "protected", - "authority": null - }, - { - "key": "admin.hr.evaluation", - "path": "/admin/hr/360-evaluation", - "componentPath": "@/views/hr/components/Degree360Evaluation", - "routeType": "protected", - "authority": null - }, { "key": "admin.crm.customers", "path": "/admin/crm/customers", diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs index 36061d2f..1a9fe556 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs @@ -13,11 +13,13 @@ using Microsoft.EntityFrameworkCore; using System.Linq; using System.Collections.Generic; using Volo.Abp.Identity; +using Volo.Abp.Timing; namespace Kurs.Platform.Data.Seeds; public class TenantDataSeeder : IDataSeedContributor, ITransientDependency { + private readonly IClock _clock; private readonly IRepository _repositoryUser; private readonly IRepository _globalSearch; private readonly IRepository _customEndpointRepository; @@ -94,6 +96,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _materialGroupRepository; public TenantDataSeeder( + IClock clock, IRepository repositoryUser, IRepository globalSearch, IRepository sectorRepository, @@ -170,6 +173,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository materialGroupRepository ) { + _clock = clock; _repositoryUser = repositoryUser; _globalSearch = globalSearch; _sectorRepository = sectorRepository; @@ -1095,6 +1099,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IsHalfDay = item.IsHalfDay, Reason = item.Reason, Status = item.Status, + AppliedDate = _clock.Now, }, autoSave: true); } } diff --git a/ui/src/components/common/MultiSelectEmployee.tsx b/ui/src/components/common/MultiSelectEmployee.tsx index da20d6f1..4ffacd30 100644 --- a/ui/src/components/common/MultiSelectEmployee.tsx +++ b/ui/src/components/common/MultiSelectEmployee.tsx @@ -1,7 +1,7 @@ import React, { useState, useRef, useEffect } from "react"; import { FaChevronDown, FaTimes } from "react-icons/fa"; import { mockEmployees } from "../../mocks/mockEmployees"; -import { EmployeeDto } from "../../types/hr"; +import { EmployeeDto } from "@/proxy/intranet/models"; interface MultiSelectEmployeeProps { selectedEmployees: string[]; diff --git a/ui/src/views/hr/components/BadgeAssignmentModal.tsx b/ui/src/views/hr/components/BadgeAssignmentModal.tsx deleted file mode 100644 index 4306a241..00000000 --- a/ui/src/views/hr/components/BadgeAssignmentModal.tsx +++ /dev/null @@ -1,336 +0,0 @@ -import React, { useState, useEffect } from "react"; -import { - FaUsers, - FaAward, - FaSave, - FaTimesCircle, - FaCalendarAlt, -} from "react-icons/fa"; -import { mockEmployees } from "../../../mocks/mockEmployees"; -import { mockBadges } from "../../../mocks/mockBadges"; - -export interface BadgeAssignmentFormData { - employeeId: string; - badgeId: string; - reason?: string; - earnedDate: string; - expiryDate?: string; - notes?: string; -} - -interface BadgeAssignmentModalProps { - isOpen: boolean; - onClose: () => void; - onSubmit: (assignmentData: BadgeAssignmentFormData) => void; - preSelectedEmployeeId?: string; - preSelectedBadgeId?: string; -} - -const BadgeAssignmentModal: React.FC = ({ - isOpen, - onClose, - onSubmit, - preSelectedEmployeeId, - preSelectedBadgeId, -}) => { - const [formData, setFormData] = useState({ - employeeId: "", - badgeId: "", - reason: "", - earnedDate: new Date().toISOString().split("T")[0], - expiryDate: "", - notes: "", - }); - - const [searchEmployee, setSearchEmployee] = useState(""); - const [searchBadge, setSearchBadge] = useState(""); - - useEffect(() => { - if (isOpen) { - setFormData({ - employeeId: preSelectedEmployeeId || "", - badgeId: preSelectedBadgeId || "", - reason: "", - earnedDate: new Date().toISOString().split("T")[0], - expiryDate: "", - notes: "", - }); - setSearchEmployee(""); - setSearchBadge(""); - } - }, [isOpen, preSelectedEmployeeId, preSelectedBadgeId]); - - const handleInputChange = ( - e: React.ChangeEvent< - HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement - > - ) => { - const { name, value } = e.target; - setFormData((prev) => ({ - ...prev, - [name]: value, - })); - }; - - const handleSubmit = (e: React.FormEvent) => { - e.preventDefault(); - onSubmit(formData); - onClose(); - }; - - const filteredEmployees = mockEmployees.filter( - (employee) => - employee.fullName.toLowerCase().includes(searchEmployee.toLowerCase()) || - employee.code.toLowerCase().includes(searchEmployee.toLowerCase()) - ); - - const filteredBadges = mockBadges.filter( - (badge) => - badge.isActive && - (badge.name.toLowerCase().includes(searchBadge.toLowerCase()) || - badge.description.toLowerCase().includes(searchBadge.toLowerCase())) - ); - - const selectedEmployee = mockEmployees.find( - (emp) => emp.id === formData.employeeId - ); - const selectedBadge = mockBadges.find( - (badge) => badge.id === formData.badgeId - ); - - return ( - isOpen && ( -
-
- {/* Header */} -
-
-
- -
-
-

Rozet Ata

-

- Personele başarı rozeti atayın -

-
-
- -
- - {/* Form */} -
-
- {/* Sol Kolon - Personel Seçimi */} -
-
-

- - Personel Seçimi -

- -
-
- -
- - {selectedEmployee && ( -
-
-
-

- {selectedEmployee.fullName} -

-

- {selectedEmployee.code} •{" "} - {selectedEmployee.department?.name} -

-
- Email:{" "} - {selectedEmployee.email} -
-
-
-
- )} -
-
-
- - {/* Sağ Kolon - Rozet Seçimi */} -
-
-

- - Rozet Seçimi -

- -
-
- -
- - {selectedBadge && ( -
-
-
- {selectedBadge.icon} -
-
-

- {selectedBadge.name} -

-

- {selectedBadge.description} -

-
-
- Puan:{" "} - {selectedBadge.points} -
-
- Kategori:{" "} - {selectedBadge.category} -
-
-
- Kriter:{" "} - {selectedBadge.criteria} -
-
-
-
- )} -
-
-
-
- - {/* Atama Detayları */} -
-

- - Atama Detayları -

- -
-
- - -
- -
- - -
- -
- - -
- -
- -