diff --git a/uniplanWeb/public/i18n/bg.json b/uniplanWeb/public/i18n/bg.json index 5d3fe91..4681fec 100644 --- a/uniplanWeb/public/i18n/bg.json +++ b/uniplanWeb/public/i18n/bg.json @@ -6,6 +6,7 @@ "type-label": "Тип", "study-mode-label": "Форма на обучение", "major-label": "Специалност", + "department-label": "Катедра", "location-label": "Местоположение", "number-label": "No.", "edit": "Редактирай", @@ -13,7 +14,10 @@ }, "room": { "room-number": "Номер на стая", - "no-rooms": "Няма записани стаи" + "no-rooms": "Няма записани стаи", + "department-label": "Катедра", + "number-label": "№" + }, "faculty": { "delete-button": "Изтрий", @@ -40,6 +44,21 @@ "title": "Редактирай специалност" } }, + "department": { + "delete-button": "Изтрий", + "edit-button": "Редактирай", + "uni-label": "Университет", + "delete-confirmation": "Сигурни ли сте, че искате да изтриете катедра с име: ", + "create-error": "Възникна грешка при създаването на катедрата.", + "update-error": "Възникна грешка при редактирането на катедрата.", + "delete-error": "Възникна грешка при изтриването на катедрата.", + "add": { + "title": "Добави катедра" + }, + "edit": { + "title": "Редактирай катедра" + } + }, "student": { "faculty-number-label": "Факултетен номер", "course-label": "Курс", @@ -60,7 +79,8 @@ "save-button": "Запази", "delete-button": "Изтрий", "option-all": "Всички", - "confirm-delete": "Потвърдете изтриването" + "confirm-delete": "Потвърдете изтриването", + "required-field": "Това поле е задължително" }, "home": { "title": "Начало!" @@ -85,4 +105,4 @@ "logout": "Изход", "login": "Вход" } -} \ No newline at end of file +} diff --git a/uniplanWeb/public/i18n/en.json b/uniplanWeb/public/i18n/en.json index bd15631..517d38b 100644 --- a/uniplanWeb/public/i18n/en.json +++ b/uniplanWeb/public/i18n/en.json @@ -7,13 +7,8 @@ "study-mode-label": "Study mode", "major-label": "Major", "location-label": "Location", - "number-label": "No.", - "edit": "Edit", - "delete": "Delete" - }, - "room": { - "room-number": "Room number", - "no-rooms": "No rooms" + "department-label": "Department", + "number-label": "No." }, "faculty": { "delete-button": "Delete", @@ -40,6 +35,21 @@ "title": "Edit major" } }, + "department": { + "delete-button": "Delete", + "edit-button": "Edit", + "uni-label": "University", + "delete-confirmation": "Are you sure you want to delete the department named: ", + "create-error": "Failed to create department.", + "update-error": "Failed to update department.", + "delete-error": "Failed to delete department.", + "add": { + "title": "Add department" + }, + "edit": { + "title": "Edit department" + } + }, "student": { "faculty-number-label": "Student ID", "course-label": "Course", @@ -60,7 +70,8 @@ "save-button": "Save", "delete-button": "Delete", "option-all": "All", - "confirm-delete": "Confirm deletion" + "confirm-delete": "Confirm deletion", + "required-field": "This field is required" }, "home": { "title": "Main!" @@ -85,4 +96,4 @@ "logout": "Logout", "login": "Login" } -} \ No newline at end of file +} diff --git a/uniplanWeb/src/app/app.routes.ts b/uniplanWeb/src/app/app.routes.ts index 69caa0b..4130587 100644 --- a/uniplanWeb/src/app/app.routes.ts +++ b/uniplanWeb/src/app/app.routes.ts @@ -17,6 +17,11 @@ export const routes: Routes = [ loadComponent: () => import('./features/faculty/faculty-panel/faculty-panel').then(m => m.FacultyPanel), }, + { + path: 'department', + loadComponent: () => + import('./features/department/department-panel/department-panel').then(m => m.DepartmentPanel), + }, { path: 'major', loadComponent: () => diff --git a/uniplanWeb/src/app/config/endpoints.ts b/uniplanWeb/src/app/config/endpoints.ts index 53a9589..d11935e 100644 --- a/uniplanWeb/src/app/config/endpoints.ts +++ b/uniplanWeb/src/app/config/endpoints.ts @@ -5,4 +5,5 @@ export const API_ENDPOINTS = { courses: `${environment.baseUrl}/courses`, faculties: `${environment.baseUrl}/faculties`, majors: `${environment.baseUrl}/majors`, + departments: `${environment.baseUrl}/departments`, }; diff --git a/uniplanWeb/src/app/core/interfaces/department-elm.ts b/uniplanWeb/src/app/core/interfaces/department-elm.ts new file mode 100644 index 0000000..a81bfe5 --- /dev/null +++ b/uniplanWeb/src/app/core/interfaces/department-elm.ts @@ -0,0 +1,6 @@ +export interface DepartmentElm { + id: string; + departmentName: string; + facultyId: string; + position: number; +} diff --git a/uniplanWeb/src/app/core/shared/navmenu-component/navmenu-component.html b/uniplanWeb/src/app/core/shared/navmenu-component/navmenu-component.html index 5cf411d..cbc83aa 100644 --- a/uniplanWeb/src/app/core/shared/navmenu-component/navmenu-component.html +++ b/uniplanWeb/src/app/core/shared/navmenu-component/navmenu-component.html @@ -30,7 +30,9 @@
+ {{'department.delete-confirmation' | translate }} + {{ data.departmentName }}? +
+| {{ 'features.number-label' | translate }} + | +{{ 'features.name-label' | translate }} + | +{{ 'features.faculty-label' | translate }} + | +{{ 'features.actions-label' | translate }} + | +
|---|
| + {{element.position}} | ++ {{element.departmentName}} | ++ {{ getFacultyName(element.facultyId) }} | ++ + + | +