Compare commits
3 Commits
cca98e136f
...
098c2e1c47
| Author | SHA1 | Date | |
|---|---|---|---|
| 098c2e1c47 | |||
| 3d8076e3b6 | |||
| 5cfc31b83c |
@ -1,6 +1,6 @@
|
||||
import { Component, HostListener, inject } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, HostListener, inject } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import {NavMenuComponent} from './components/nav-menu/nav-menu.component'
|
||||
import { NavMenuComponent } from './components/nav-menu/nav-menu.component'
|
||||
import { TransferService } from './services/button/transfer.service';
|
||||
import { UpdateService } from './services/button/update.service';
|
||||
import { RefreshService } from './services/button/refresh.service';
|
||||
@ -11,7 +11,8 @@ import { DeletionService } from './services/button/deletion.service';
|
||||
standalone: true,
|
||||
imports: [RouterOutlet, NavMenuComponent],
|
||||
templateUrl: './app.component.html',
|
||||
styleUrl: './app.component.scss'
|
||||
styleUrl: './app.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.Default
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'app';
|
||||
|
||||
@ -6,7 +6,7 @@ import { RouterModule } from '@angular/router';
|
||||
@Component({
|
||||
selector: 'tab-card',
|
||||
standalone: true,
|
||||
imports: [CommonModule, CardComponent, RouterModule],
|
||||
imports: [CommonModule, RouterModule],
|
||||
templateUrl: './tab-card.component.html',
|
||||
styleUrl: './tab-card.component.css'
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, model, signal } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, model, signal } from '@angular/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { FormControl, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
@ -9,7 +9,6 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
import { UserGroupDirImportComponent } from "../../user-group-dir-import/user-group-dir-import.component";
|
||||
import { UserService } from '../../../services/api/user.service';
|
||||
import { RefreshService } from '../../../services/button/refresh.service';
|
||||
import { GroupDirImportComponent } from "../../group-dir-import/group-dir-import.component";
|
||||
@ -19,9 +18,10 @@ import Swal from 'sweetalert2';
|
||||
@Component({
|
||||
selector: 'app-group-form',
|
||||
standalone: true,
|
||||
imports: [MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule, MatIconModule, MatButtonModule, MatCheckboxModule, CommonModule, MatTabsModule, UserGroupDirImportComponent, GroupDirImportComponent],
|
||||
imports: [MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule, MatIconModule, MatButtonModule, MatCheckboxModule, CommonModule, MatTabsModule, GroupDirImportComponent],
|
||||
templateUrl: './group-form.component.html',
|
||||
styleUrl: './group-form.component.scss'
|
||||
styleUrl: './group-form.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class GroupFormComponent {
|
||||
readonly groupname = new FormControl('', [Validators.required]);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';
|
||||
import { Group } from '../../../services/api/api-models';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
@ -22,7 +22,8 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
standalone: true,
|
||||
imports: [MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule, MatIconModule, MatButtonModule, CommonModule, MatTabsModule, MatSelectModule, MatDividerModule, MatCheckboxModule, MatSlideToggleModule],
|
||||
templateUrl: './group-update-form.component.html',
|
||||
styleUrl: './group-update-form.component.scss'
|
||||
styleUrl: './group-update-form.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class GroupUpdateFormComponent {
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ import { UserRep } from '../../../services/api/api-models';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { UserRepService } from '../../../services/api/user-representation.service';
|
||||
import { GroupUpdateFormComponent } from '../group-update-form/group-update-form.component';
|
||||
import { JsonPipe } from '@angular/common';
|
||||
import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { DateAdapter, MAT_DATE_LOCALE, provideNativeDateAdapter } from '@angular/material/core';
|
||||
import { MatDatepickerIntl, MatDatepickerModule } from '@angular/material/datepicker';
|
||||
@ -24,7 +23,7 @@ import 'moment/locale/de';
|
||||
{ provide: MAT_DATE_LOCALE, useValue: 'de-DE' },
|
||||
provideMomentDateAdapter()
|
||||
],
|
||||
imports: [MatFormFieldModule, MatDatepickerModule, FormsModule, ReactiveFormsModule, JsonPipe, MatButtonModule, MatIconModule, MatInputModule, MatSlideToggleModule],
|
||||
imports: [MatFormFieldModule, MatDatepickerModule, FormsModule, ReactiveFormsModule, MatButtonModule, MatIconModule, MatInputModule, MatSlideToggleModule],
|
||||
templateUrl: './rep-create-form.component.html',
|
||||
styleUrl: './rep-create-form.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, signal } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { FormControl, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
@ -18,7 +18,8 @@ import Swal from 'sweetalert2';
|
||||
standalone: true,
|
||||
imports: [MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule, MatIconModule, MatButtonModule, CommonModule, MatTabsModule, UserGroupDirImportComponent],
|
||||
templateUrl: './user-create-form.component.html',
|
||||
styleUrl: './user-create-form.component.scss'
|
||||
styleUrl: './user-create-form.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UserCreateFormComponent {
|
||||
readonly email = new FormControl('', [Validators.required, Validators.email]);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';
|
||||
import { User } from '../../../services/api/api-models';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { FormControl, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
@ -22,7 +22,8 @@ import {MatDividerModule} from '@angular/material/divider';
|
||||
standalone: true,
|
||||
imports: [MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule, MatIconModule, MatButtonModule, CommonModule, MatTabsModule, MatSelectModule, MatDividerModule],
|
||||
templateUrl: './user-update-form.component.html',
|
||||
styleUrl: './user-update-form.component.scss'
|
||||
styleUrl: './user-update-form.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UserUpdateFormComponent {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, Inject, OnInit, ViewChild } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, Inject, OnInit, ViewChild } from '@angular/core';
|
||||
import { GuiRowSelection, GuiRowSelectionMode, GuiRowSelectionType } from '@generic-ui/ngx-grid';
|
||||
import Swal from 'sweetalert2';
|
||||
import { GroupService } from '../../services/api/group.service';
|
||||
@ -12,7 +12,8 @@ import { DirGroup } from '../../services/api/api-models';
|
||||
imports: [DirGroupTableComponent],
|
||||
selector: 'app-group-dir-import',
|
||||
templateUrl: './group-dir-import.component.html',
|
||||
styleUrl: './group-dir-import.component.css'
|
||||
styleUrl: './group-dir-import.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class GroupDirImportComponent implements OnInit {
|
||||
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-info',
|
||||
standalone: true,
|
||||
imports: [],
|
||||
templateUrl: './info.component.html',
|
||||
styleUrl: './info.component.scss'
|
||||
styleUrl: './info.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class InfoComponent {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, Inject, Input } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, Inject, Input } from '@angular/core';
|
||||
import { AuthenticationService } from '../../services/api/authentication.service';
|
||||
import Swal from 'sweetalert2';
|
||||
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
@ -10,7 +10,8 @@ import { FormsModule } from '@angular/forms';
|
||||
imports: [CommonModule, FormsModule],
|
||||
selector: 'app-login',
|
||||
templateUrl: './login.component.html',
|
||||
styleUrl: './login.component.css'
|
||||
styleUrl: './login.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class LoginComponent {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, QueryList, ViewChildren } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, QueryList, ViewChildren } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { AuthenticationService, IsLogedIn } from '../../services/api/authentication.service';
|
||||
import { LoginComponent } from '../login/login.component';
|
||||
@ -23,7 +23,8 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
imports: [RouterModule, CommonModule, ColorModeBttnComponent, MatIconModule, MatBadgeModule, MatSlideToggleModule, FormsModule, MatButtonModule, MatTooltipModule],
|
||||
selector: 'app-nav-menu',
|
||||
templateUrl: './nav-menu.component.html',
|
||||
styleUrls: ['./nav-menu.component.css']
|
||||
styleUrls: ['./nav-menu.component.css'],
|
||||
changeDetection: ChangeDetectionStrategy.Default
|
||||
})
|
||||
export class NavMenuComponent {
|
||||
isLogedIn() {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { User } from '../../../services/api/api-models'
|
||||
import { MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';
|
||||
@ -8,7 +8,8 @@ import { MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';
|
||||
standalone: true,
|
||||
imports: [MatListModule],
|
||||
templateUrl: './user-summary.component.html',
|
||||
styleUrl: './user-summary.component.scss'
|
||||
styleUrl: './user-summary.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UserSummaryComponent {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, Inject, Input, OnDestroy, OnInit, ViewChild, input } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, Inject, Input, OnDestroy, OnInit, ViewChild, input } from '@angular/core';
|
||||
import { ApiService } from '../../../services/api/api-service';
|
||||
import { GuiGridModule, GuiColumn, GuiColumnMenu, GuiSorting, GuiRowDetail, GuiPaging, GuiPagingDisplay, GuiSearching, GuiCellEdit, GuiInfoPanel, GuiTitlePanel, GuiRowSelection, GuiSelectedRow, GuiGridComponent, GuiGridApi, GuiTheme, GuiRowStyle, GuiRowClass } from '@generic-ui/ngx-grid';
|
||||
import { Subscription } from 'rxjs/internal/Subscription';
|
||||
@ -11,7 +11,8 @@ import { FormsModule } from '@angular/forms';
|
||||
imports: [CommonModule, FormsModule, GuiGridModule],
|
||||
selector: 'app-base-table',
|
||||
templateUrl: './base-table.component.html',
|
||||
styleUrl: './base-table.component.css'
|
||||
styleUrl: './base-table.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class BaseTableComponent<TModel, TApiService extends ApiService<TModel>> implements OnInit, OnDestroy {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
|
||||
import { BaseTableComponent } from '../base-table/base-table.component';
|
||||
import { DirGroupService } from '../../../services/api/dir-group.service';
|
||||
import { DirGroup } from '../../../services/api/api-models';
|
||||
@ -15,7 +15,8 @@ import { firstValueFrom } from 'rxjs';
|
||||
imports: [CommonModule, FormsModule, GuiGridModule ],
|
||||
selector: 'app-dir-group-table',
|
||||
templateUrl: '../base-table/base-table.component.html',
|
||||
styleUrl: './dir-group-table.component.css'
|
||||
styleUrl: './dir-group-table.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class DirGroupTableComponent extends BaseTableComponent<DirGroup, DirGroupService> {
|
||||
constructor(service: DirGroupService, cModeService: ColorModeService, private gService: GroupService) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
|
||||
import { DirUser } from '../../../services/api/api-models';
|
||||
import { DirUserService } from '../../../services/api/dir-user.service';
|
||||
import { BaseTableComponent } from '../base-table/base-table.component';
|
||||
@ -15,7 +15,8 @@ import { firstValueFrom } from 'rxjs/internal/firstValueFrom';
|
||||
imports: [CommonModule, FormsModule, GuiGridModule],
|
||||
selector: 'app-dir-user-table',
|
||||
templateUrl: '../base-table/base-table.component.html',
|
||||
styleUrl: './dir-user-table.component.css'
|
||||
styleUrl: './dir-user-table.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class DirUserTableComponent extends BaseTableComponent<DirUser, DirUserService> {
|
||||
constructor(service: DirUserService, cModeService: ColorModeService, private uService: UserService) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
|
||||
import { GroupService } from '../../../services/api/group.service';
|
||||
import { Group } from '../../../services/api/api-models';
|
||||
import { GuiGridModule, GuiColumn } from '@generic-ui/ngx-grid';
|
||||
@ -14,7 +14,8 @@ import { GroupOfUserService } from '../../../services/api/group-of-user.service'
|
||||
imports: [CommonModule, FormsModule, GuiGridModule],
|
||||
selector: 'app-group-table',
|
||||
templateUrl: '../base-table/base-table.component.html',
|
||||
styleUrl: './group-table.component.css'
|
||||
styleUrl: './group-table.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class GroupTableComponent extends BaseTableComponent<Group, GroupService> {
|
||||
constructor(service: GroupService, cModeService: ColorModeService, private gouService: GroupOfUserService) {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { GroupOfUserService } from '../../../services/group-of-user.service';
|
||||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
|
||||
import { GroupOfUserService } from '../../../services/api/group-of-user.service';
|
||||
import { GroupOfUser } from '../../../services/api/api-models';
|
||||
import { GuiGridModule, GuiColumn } from '@generic-ui/ngx-grid';
|
||||
import { GuiGridModule } from '@generic-ui/ngx-grid';
|
||||
import { BaseTableComponent } from '../base-table/base-table.component';
|
||||
import { ColorModeService } from '../../../services/color-mode.service';
|
||||
import { ColorModeService } from '../../../services/button/color-mode.service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { env } from '../../../../environments/environment';
|
||||
@ -13,7 +13,8 @@ import { env } from '../../../../environments/environment';
|
||||
imports: [CommonModule, FormsModule, GuiGridModule ],
|
||||
selector: 'app-group-user-table',
|
||||
templateUrl: '../base-table/base-table.component.html',
|
||||
styleUrl: './group-user-table.component.css'
|
||||
styleUrl: './group-user-table.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class GroupUserTableComponent extends BaseTableComponent<GroupOfUser, GroupOfUserService> {
|
||||
constructor(service: GroupOfUserService, cModeService: ColorModeService) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { Module } from '../../../services/api/api-models';
|
||||
import { GuiGridModule } from '@generic-ui/ngx-grid';
|
||||
import { BaseTableComponent } from '../base-table/base-table.component';
|
||||
@ -14,7 +14,8 @@ import { ModuleOfUserService } from '../../../services/api/module-of-user.servic
|
||||
imports: [CommonModule, FormsModule, GuiGridModule],
|
||||
selector: 'app-module-table',
|
||||
templateUrl: '../base-table/base-table.component.html',
|
||||
styleUrl: './module-table.component.css'
|
||||
styleUrl: './module-table.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class ModuleTableComponent extends BaseTableComponent<Module, ModuleService> {
|
||||
constructor(
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { UserRep } from '../../../services/api/api-models';
|
||||
import { UserRepService } from '../../../services/api/user-representation.service';
|
||||
import { BaseTableComponent } from '../base-table/base-table.component';
|
||||
@ -13,7 +13,8 @@ import { env } from '../../../../environments/environment';
|
||||
imports: [CommonModule, FormsModule, GuiGridModule],
|
||||
selector: 'app-user-rep-table',
|
||||
templateUrl: '../base-table/base-table.component.html',
|
||||
styleUrl: './user-rep-table.component.css'
|
||||
styleUrl: './user-rep-table.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UserRepTableComponent extends BaseTableComponent<UserRep, UserRepService> {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { UserService } from '../../../services/api/user.service';
|
||||
import { ModuleOfUserService } from '../../../services/api/module-of-user.service';
|
||||
import { GroupOfUserService } from '../../../services/api/group-of-user.service';
|
||||
@ -15,7 +15,8 @@ import { env } from '../../../../environments/environment';
|
||||
imports: [CommonModule, FormsModule, GuiGridModule],
|
||||
selector: 'app-user-table',
|
||||
templateUrl: '../base-table/base-table.component.html',
|
||||
styleUrl: './user-table.component.css'
|
||||
styleUrl: './user-table.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UserTableComponent extends BaseTableComponent<User, UserService> {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AfterViewInit, Component, Inject, OnInit, ViewChild } from '@angular/core';
|
||||
import { AfterViewInit, ChangeDetectionStrategy, Component, Inject, OnInit, ViewChild } from '@angular/core';
|
||||
import { GuiRowSelection, GuiRowSelectionMode, GuiRowSelectionType, GuiSelectedRow } from '@generic-ui/ngx-grid';
|
||||
import Swal from 'sweetalert2';
|
||||
import { GroupService } from '../../services/api/group.service';
|
||||
@ -15,7 +15,8 @@ import { RefreshService } from '../../services/button/refresh.service';
|
||||
imports: [DirGroupTableComponent, DirUserTableComponent],
|
||||
selector: 'app-user-group-dir-import',
|
||||
templateUrl: './user-group-dir-import.component.html',
|
||||
styleUrl: './user-group-dir-import.component.css'
|
||||
styleUrl: './user-group-dir-import.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UserGroupDirImportComponent implements OnInit, AfterViewInit {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, HostListener, inject } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, HostListener, inject } from '@angular/core';
|
||||
import { RefreshService } from '../../services/button/refresh.service';
|
||||
import { CreationService } from '../../services/button/creation.service';
|
||||
import { UpdateService } from '../../services/button/update.service';
|
||||
@ -11,7 +11,8 @@ import { ButtonVisibilityService } from '../../services/button/button-visibility
|
||||
standalone: true,
|
||||
imports: [],
|
||||
templateUrl: './base-page.component.html',
|
||||
styleUrl: './base-page.component.scss'
|
||||
styleUrl: './base-page.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class BasePageComponent {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AfterViewInit, Component, ViewChild, inject } from '@angular/core';
|
||||
import { AfterViewInit, ChangeDetectionStrategy, Component, ViewChild, inject } from '@angular/core';
|
||||
import { GroupTableComponent } from '../../components/tables/group-table/group-table.component';
|
||||
import { UserTableComponent } from '../../components/tables/user-table/user-table.component';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
@ -17,7 +17,8 @@ import { GroupUpdateFormComponent } from '../../components/forms/group-update-fo
|
||||
imports: [GroupTableComponent, UserTableComponent, MatTabsModule],
|
||||
selector: 'app-group',
|
||||
templateUrl: './group.component.html',
|
||||
styleUrl: './group.component.css'
|
||||
styleUrl: './group.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class GroupComponent extends BasePageComponent implements AfterViewInit {
|
||||
initWithoutData = () => { }
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
import { AfterViewInit, Component } from '@angular/core';
|
||||
import { AfterViewInit, ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { BasePageComponent } from '../base-page/base-page.component';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'app-home',
|
||||
templateUrl: './home.component.html'
|
||||
templateUrl: './home.component.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class HomeComponent extends BasePageComponent implements AfterViewInit {
|
||||
ngAfterViewInit(): void {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AfterViewInit, Component, ViewChild } from '@angular/core';
|
||||
import { AfterViewInit, ChangeDetectionStrategy, Component, ViewChild } from '@angular/core';
|
||||
import { ModuleTableComponent } from '../../components/tables/module-table/module-table.component';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
import { UserTableComponent } from '../../components/tables/user-table/user-table.component';
|
||||
@ -10,7 +10,8 @@ import { BasePageComponent } from '../base-page/base-page.component';
|
||||
imports: [ModuleTableComponent, MatTabsModule, UserTableComponent],
|
||||
selector: 'app-module',
|
||||
templateUrl: './module.component.html',
|
||||
styleUrl: './module.component.css'
|
||||
styleUrl: './module.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class ModuleComponent extends BasePageComponent implements AfterViewInit {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AfterViewInit, Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { AfterViewInit, ChangeDetectionStrategy, Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { TabItem } from '../../components/common/tab-card/tab-card.component';
|
||||
import { GuiRowSelection, GuiRowSelectionMode, GuiRowSelectionType, GuiSelectedRow } from '@generic-ui/ngx-grid';
|
||||
import { UserTableComponent } from '../../components/tables/user-table/user-table.component';
|
||||
@ -13,7 +13,8 @@ import { BasePageComponent } from '../base-page/base-page.component';
|
||||
imports: [MatTabsModule, MatTabGroup, UserTableComponent, ModuleTableComponent, GroupTableComponent],
|
||||
selector: 'app-user-assignment',
|
||||
templateUrl: './user-assignment.component.html',
|
||||
styleUrl: './user-assignment.component.scss'
|
||||
styleUrl: './user-assignment.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UserAssignmentComponent extends BasePageComponent implements OnInit, AfterViewInit {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AfterViewInit, Component, ViewChild, inject } from '@angular/core';
|
||||
import { AfterViewInit, ChangeDetectionStrategy, Component, ViewChild, inject } from '@angular/core';
|
||||
import { GuiColumn, GuiRowClass, GuiRowStyle, GuiSelectedRow } from '@generic-ui/ngx-grid/gui/grid/src/core/api/gui.grid.public-api';
|
||||
import { UserTableComponent } from '../../components/tables/user-table/user-table.component';
|
||||
import { UserRepTableComponent } from '../../components/tables/user-rep-table/user-rep-table.component';
|
||||
@ -20,7 +20,8 @@ import { UserService } from '../../services/api/user.service';
|
||||
imports: [MatTabsModule, MatTabGroup, UserTableComponent, GroupTableComponent, UserRepTableComponent],
|
||||
selector: 'app-user-representation',
|
||||
templateUrl: './user-representation.component.html',
|
||||
styleUrl: './user-representation.component.css'
|
||||
styleUrl: './user-representation.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UserRepresentationComponent extends BasePageComponent implements AfterViewInit {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AfterViewInit, Component, ViewChild, inject } from '@angular/core';
|
||||
import { AfterViewInit, ChangeDetectionStrategy, Component, ViewChild, inject } from '@angular/core';
|
||||
import { GuiCellEdit, GuiSelectedRow } from '@generic-ui/ngx-grid';
|
||||
import { UserTableComponent } from '../../components/tables/user-table/user-table.component';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
@ -20,7 +20,8 @@ import { UserUpdateFormComponent } from '../../components/forms/user-update-form
|
||||
imports: [UserTableComponent, MatTabsModule, GroupTableComponent, ModuleTableComponent, MatButtonModule, MatBottomSheetModule],
|
||||
selector: 'app-user',
|
||||
templateUrl: './user.component.html',
|
||||
styleUrl: './user.component.css'
|
||||
styleUrl: './user.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UserComponent extends BasePageComponent implements AfterViewInit {
|
||||
initWithoutData = () => { }
|
||||
|
||||
@ -7,9 +7,10 @@ import { UrlService } from './url.service';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
// TODO: Consolidate all directory services and remove unnecessary methods.
|
||||
export class DirService {
|
||||
private baseUrl: string
|
||||
constructor(private http: HttpClient, urlService : UrlService) {
|
||||
constructor(private http: HttpClient, urlService: UrlService) {
|
||||
this.http = http;
|
||||
this.baseUrl = urlService.apiRoute.directory;
|
||||
}
|
||||
@ -22,4 +23,8 @@ export class DirService {
|
||||
|
||||
return this.http.get<DirUser[]>(this.baseUrl, { params, withCredentials: true });
|
||||
}
|
||||
|
||||
createSearchRoot(username: string, password: string): Observable<Object> {
|
||||
return this.http.post(this.baseUrl, { username: username, password: password }, { withCredentials: true })
|
||||
}
|
||||
}
|
||||
@ -82,16 +82,16 @@ public class DirectoryController : ControllerBase
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost("CreateSearchRoot")]
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> CreateSearchRoot([FromBody] SearchRootCreateDto searchRootCreateDto)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dirEntryUsername = searchRootCreateDto.DirEntryUsername ?? CurrentUser;
|
||||
var dirEntryUsername = searchRootCreateDto.Username ?? CurrentUser;
|
||||
if (dirEntryUsername is null)
|
||||
return Unauthorized();
|
||||
|
||||
bool isValid = _dirSearchService.ValidateCredentials(dirEntryUsername, searchRootCreateDto.DirEntryPassword);
|
||||
bool isValid = _dirSearchService.ValidateCredentials(dirEntryUsername, searchRootCreateDto.Password);
|
||||
|
||||
if (!isValid)
|
||||
return Unauthorized(Result.Fail().Message(_localizer[Key.UserNotFound]));
|
||||
@ -100,7 +100,7 @@ public class DirectoryController : ControllerBase
|
||||
if (!userResult.IsSuccess || userResult.Data is null)
|
||||
return Unauthorized(Result.Fail().Message(_localizer[Key.UserNotFoundInLocalDB]));
|
||||
|
||||
_dirSearchService.SetSearchRootCache(userResult.Data.Username, searchRootCreateDto.DirEntryPassword);
|
||||
_dirSearchService.SetSearchRootCache(userResult.Data.Username, searchRootCreateDto.Password);
|
||||
return Ok();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -162,11 +162,12 @@ public class DirectoryController : ControllerBase
|
||||
}
|
||||
|
||||
[HttpGet("Group")]
|
||||
public IActionResult GetGroups(string? dirEntryUsername, params string[] propName)
|
||||
[Authorize]
|
||||
public IActionResult GetGroups(params string[] propName)
|
||||
{
|
||||
try
|
||||
{
|
||||
dirEntryUsername ??= CurrentUser;
|
||||
string dirEntryUsername = CurrentUser!;
|
||||
|
||||
if (dirEntryUsername is null)
|
||||
return Unauthorized();
|
||||
@ -190,12 +191,12 @@ public class DirectoryController : ControllerBase
|
||||
}
|
||||
|
||||
[HttpGet("User")]
|
||||
public IActionResult GetUsersByGroupName(string? dirEntryUsername, [FromQuery] string? groupName = null)
|
||||
public IActionResult GetUsersByGroupName([FromQuery] string? groupName = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] propName = { "memberof", "samaccountname", "givenname", "sn", "mail" };
|
||||
dirEntryUsername ??= CurrentUser;
|
||||
string dirEntryUsername = CurrentUser!;
|
||||
|
||||
if (dirEntryUsername is null)
|
||||
return Unauthorized();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs
|
||||
{
|
||||
public record SearchRootCreateDto(string? DirEntryUsername, string DirEntryPassword);
|
||||
public record SearchRootCreateDto(string? Username, string Password);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user