Commit 478d1bca authored by Kostis Trantzas's avatar Kostis Trantzas
Browse files

Merge branch...

Merge branch '31-a-non-admin-user-must-not-be-able-to-delete-a-service-order-a-resource-from-the-respective-lists' into 'develop'

Resolve "A non-admin user must not be able to delete a Service Order and a Resource from the respective lists"

See merge request !26
parents 7b96b94a 2ec9465f
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@
                                <a routerLink='/{{appService.portalDomain}}/resource/{{element.id}}'>
                                    <button class="btn btn-warning btn-sm m-1"><i class="far fa-edit"></i></button>
                                </a>                                
                                <button class="btn btn-danger btn-sm m-1" (click)="openResourceDeleteDialog(element)"><i
                                <button class="btn btn-danger btn-sm m-1" *ngIf="authService.portalUserJWT?.realm_access.roles.includes('ADMIN')" (click)="openResourceDeleteDialog(element)"><i
                                        class="far fa-trash-alt"></i></button>
                            </td>
                        </ng-container>
+3 −1
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ import { fadeIn } from 'src/app/shared/animations/animations';
import { AppService } from 'src/app/shared/services/app.service';
import { HttpErrorResponse } from '@angular/common/http';
import { DeleteResourceComponent } from '../../catalogManagement/delete-resource/delete-resource.component';
import { AuthService } from 'src/app/shared/services/auth.service';

@Component({
  selector: 'app-list-resource-inventory',
@@ -25,7 +26,8 @@ export class ListResourceInventoryComponent implements OnInit {
    public dialog: MatDialog,
    private resourceService: ResourceService,
    private toast: ToastrService,
    public appService: AppService
    public appService: AppService,
    public authService: AuthService
  ) { }

  displayedColumns = ['name', '@type', 'category', 'resourceStatus', 'startOperatingDate', 'actions']
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@
                                    <a routerLink='/{{appService.portalDomain}}/service_order/{{element.id}}'>
                                        <button class="btn btn-primary btn-sm m-1" ><i class="fas fa-search"></i></button>
                                    </a>
                                    <button class="btn btn-danger btn-sm m-1" (click)="openOrderDeleteDialog(element)"><i class="far fa-trash-alt"></i></button>
                                    <button *ngIf="authService.portalUserJWT?.realm_access.roles.includes('ADMIN')" class="btn btn-danger btn-sm m-1" (click)="openOrderDeleteDialog(element)"><i class="far fa-trash-alt"></i></button>
                                </td>
                            </ng-container>
                    
+2 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import interactionPlugin from '@fullcalendar/interaction';
import resourceTimelinePlugin  from '@fullcalendar/resource-timeline';
import { Router } from '@angular/router';
import { Plugins } from 'protractor/built/plugins';
import { AuthService } from 'src/app/shared/services/auth.service';

@Component({
  selector: 'app-list-service-orders',
@@ -37,6 +38,7 @@ export class ListServiceOrdersComponent implements OnInit {
    private toastr: ToastrService,
    private cacheService: CacheSearchParametersService,
    public appService: AppService,
    public authService: AuthService,
    private router: Router
  ) { }

+2 −2
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@
                                <a routerLink='/{{appService.portalDomain}}/service_test/{{element.id}}'>
                                    <button class="btn btn-warning btn-sm m-1"><i class="far fa-edit"></i></button>
                                </a>
                                <button class="btn btn-danger btn-sm m-1" (click)="openTestDeleteDialog(element)"><i class="far fa-trash-alt"></i></button>
                                <button class="btn btn-danger btn-sm m-1" *ngIf="authService.portalUserJWT?.realm_access.roles.includes('ADMIN')" (click)="openTestDeleteDialog(element)"><i class="far fa-trash-alt"></i></button>
                            </td>
                        </ng-container>

Loading