mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 18:53:29 +00:00
Add AC Team eslint configuration (#9971)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../../../../../libs/admin-console/.eslintrc.json"
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { Component, OnDestroy, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
import { firstValueFrom, from, map } from "rxjs";
|
||||
import { switchMap, takeUntil } from "rxjs/operators";
|
||||
@@ -33,7 +33,7 @@ const DisallowedPlanTypes = [
|
||||
@Component({
|
||||
templateUrl: "clients.component.html",
|
||||
})
|
||||
export class ClientsComponent extends BaseClientsComponent {
|
||||
export class ClientsComponent extends BaseClientsComponent implements OnInit, OnDestroy {
|
||||
providerId: string;
|
||||
addableOrganizations: Organization[];
|
||||
loading = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, ViewChild, ViewContainerRef } from "@angular/core";
|
||||
import { Component, OnInit, ViewChild, ViewContainerRef } from "@angular/core";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
import { first } from "rxjs/operators";
|
||||
@@ -34,7 +34,10 @@ import { UserAddEditComponent } from "./user-add-edit.component";
|
||||
templateUrl: "people.component.html",
|
||||
})
|
||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
||||
export class PeopleComponent extends BasePeopleComponent<ProviderUserUserDetailsResponse> {
|
||||
export class PeopleComponent
|
||||
extends BasePeopleComponent<ProviderUserUserDetailsResponse>
|
||||
implements OnInit
|
||||
{
|
||||
@ViewChild("addEdit", { read: ViewContainerRef, static: true }) addEditModalRef: ViewContainerRef;
|
||||
@ViewChild("groupsTemplate", { read: ViewContainerRef, static: true })
|
||||
groupsModalRef: ViewContainerRef;
|
||||
@@ -154,11 +157,11 @@ export class PeopleComponent extends BasePeopleComponent<ProviderUserUserDetails
|
||||
comp.name = this.userNamePipe.transform(user);
|
||||
comp.providerId = this.providerId;
|
||||
comp.providerUserId = user != null ? user.id : null;
|
||||
comp.onSavedUser.subscribe(() => {
|
||||
comp.savedUser.subscribe(() => {
|
||||
modal.close();
|
||||
this.load();
|
||||
});
|
||||
comp.onDeletedUser.subscribe(() => {
|
||||
comp.deletedUser.subscribe(() => {
|
||||
modal.close();
|
||||
this.removeUser(user);
|
||||
});
|
||||
|
||||
@@ -18,8 +18,8 @@ export class UserAddEditComponent implements OnInit {
|
||||
@Input() name: string;
|
||||
@Input() providerUserId: string;
|
||||
@Input() providerId: string;
|
||||
@Output() onSavedUser = new EventEmitter();
|
||||
@Output() onDeletedUser = new EventEmitter();
|
||||
@Output() savedUser = new EventEmitter();
|
||||
@Output() deletedUser = new EventEmitter();
|
||||
|
||||
loading = true;
|
||||
editMode = false;
|
||||
@@ -82,7 +82,7 @@ export class UserAddEditComponent implements OnInit {
|
||||
null,
|
||||
this.i18nService.t(this.editMode ? "editedUserId" : "invitedUsers", this.name),
|
||||
);
|
||||
this.onSavedUser.emit();
|
||||
this.savedUser.emit();
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ export class UserAddEditComponent implements OnInit {
|
||||
null,
|
||||
this.i18nService.t("removedUserId", this.name),
|
||||
);
|
||||
this.onDeletedUser.emit();
|
||||
this.deletedUser.emit();
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user