refactor: clean code

This commit is contained in:
2024-12-18 06:57:27 +03:00
parent 3af8c43cd9
commit a2d4151cc3
47 changed files with 181 additions and 150 deletions

View File

@ -1,6 +1,6 @@
import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';
import AuthApiService from "@api/v1/authApiService";
import {AuthRoles} from "@model/AuthRoles";
import {AuthRoles} from "@model/authRoles";
import {catchError, of} from "rxjs";
@Directive({
@ -13,7 +13,8 @@ export class HasRoleDirective {
private templateRef: TemplateRef<any>,
private viewContainer: ViewContainerRef,
private authService: AuthApiService
) {}
) {
}
@Input() set appHasRole(role: AuthRoles) {
this.viewContainer.clear();
@ -29,6 +30,6 @@ export class HasRoleDirective {
this.viewContainer.createEmbeddedView(this.templateRef);
else
this.viewContainer.clear();
})
});
}
}