This commit is contained in:
@ -0,0 +1,9 @@
|
||||
<h1 class="text-2xl">Actions</h1>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-5 mt-5">
|
||||
<app-button (click)="auth.logout()">logout</app-button>
|
||||
<app-button (click)="changePW()">Change Password</app-button>
|
||||
</div>
|
||||
|
||||
<app-modal [(open)]="changePWOpen">
|
||||
<app-change-password (done)="changePWOpen = false" />
|
||||
</app-modal>
|
@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AccountComponent } from './account.component';
|
||||
|
||||
describe('AccountComponent', () => {
|
||||
let component: AccountComponent;
|
||||
let fixture: ComponentFixture<AccountComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [AccountComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AccountComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
19
web/src/app/routes/dashboard/account/account.component.ts
Normal file
19
web/src/app/routes/dashboard/account/account.component.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
||||
import { AuthService } from '../../../shared/services/auth.service';
|
||||
import { ButtonComponent } from '../../../components/button/button.component';
|
||||
import { ModalComponent } from '../../../components/modal/modal.component';
|
||||
import { ChangePasswordComponent } from '../../../components/change-password/change-password.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-account',
|
||||
imports: [ButtonComponent, ModalComponent, ChangePasswordComponent],
|
||||
templateUrl: './account.component.html',
|
||||
})
|
||||
export class AccountComponent {
|
||||
auth = inject(AuthService);
|
||||
changePWOpen: boolean = false;
|
||||
|
||||
changePW() {
|
||||
this.changePWOpen = true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user