feat: Added file formatting
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
mat-card-title {
|
||||
font-size: 24pt;
|
||||
}
|
||||
font-size: 24pt;
|
||||
}
|
||||
|
||||
@@ -1,35 +1,28 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MessageComponent } from './message.component';
|
||||
import { AdminCommService } from 'src/app/admin-view/admin-comm.service';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { DateTime } from 'luxon';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'
|
||||
import { MessageComponent } from './message.component'
|
||||
import { AdminCommService } from 'src/app/admin-view/admin-comm.service'
|
||||
import { MatCardModule } from '@angular/material/card'
|
||||
import { DateTime } from 'luxon'
|
||||
|
||||
describe('MessageComponent', () => {
|
||||
let component: MessageComponent;
|
||||
let fixture: ComponentFixture<MessageComponent>;
|
||||
let component: MessageComponent
|
||||
let fixture: ComponentFixture<MessageComponent>
|
||||
|
||||
beforeEach(async () => {
|
||||
const acMock = {
|
||||
|
||||
}
|
||||
const acMock = {}
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [MessageComponent],
|
||||
providers: [
|
||||
{provide: AdminCommService, useValue: acMock}
|
||||
],
|
||||
imports: [
|
||||
MatCardModule
|
||||
]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(MessageComponent);
|
||||
component = fixture.componentInstance;
|
||||
component.item = {_id: "test", sentDate: DateTime.now(), title: "Test"}
|
||||
fixture.detectChanges();
|
||||
});
|
||||
providers: [{ provide: AdminCommService, useValue: acMock }],
|
||||
imports: [MatCardModule],
|
||||
}).compileComponents()
|
||||
|
||||
fixture = TestBed.createComponent(MessageComponent)
|
||||
component = fixture.componentInstance
|
||||
component.item = { _id: 'test', sentDate: DateTime.now(), title: 'Test' }
|
||||
fixture.detectChanges()
|
||||
})
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
expect(component).toBeTruthy()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { DateTime } from 'luxon';
|
||||
import { AdminCommService } from 'src/app/admin-view/admin-comm.service';
|
||||
import { Component, Input } from '@angular/core'
|
||||
import { DateTime } from 'luxon'
|
||||
import { AdminCommService } from 'src/app/admin-view/admin-comm.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-message',
|
||||
templateUrl: './message.component.html',
|
||||
styleUrl: './message.component.scss',
|
||||
standalone: false
|
||||
selector: 'app-message',
|
||||
templateUrl: './message.component.html',
|
||||
styleUrl: './message.component.scss',
|
||||
standalone: false,
|
||||
})
|
||||
export class MessageComponent {
|
||||
@Input() item!: {_id: string, sentDate: DateTime, title: string}
|
||||
@Input() item!: { _id: string; sentDate: DateTime; title: string }
|
||||
body?: string
|
||||
rcpts?: {_id: string, uname: string, room?: string, fname?: string, surname?: string}[]
|
||||
rcpts?: {
|
||||
_id: string
|
||||
uname: string
|
||||
room?: string
|
||||
fname?: string
|
||||
surname?: string
|
||||
}[]
|
||||
loading: boolean = false
|
||||
constructor (readonly acu: AdminCommService) {}
|
||||
constructor(readonly acu: AdminCommService) {}
|
||||
|
||||
getMessage() {
|
||||
this.loading = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.cardContainer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1ch;
|
||||
margin: 1ch;
|
||||
}
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1ch;
|
||||
margin: 1ch;
|
||||
}
|
||||
|
||||
@@ -1,39 +1,34 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'
|
||||
|
||||
import { OutboxComponent } from './outbox.component';
|
||||
import { AdminCommService } from '../../admin-comm.service';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { of } from 'rxjs';
|
||||
import { OutboxComponent } from './outbox.component'
|
||||
import { AdminCommService } from '../../admin-comm.service'
|
||||
import { RouterModule } from '@angular/router'
|
||||
import { of } from 'rxjs'
|
||||
|
||||
describe('OutboxComponent', () => {
|
||||
let component: OutboxComponent;
|
||||
let fixture: ComponentFixture<OutboxComponent>;
|
||||
let component: OutboxComponent
|
||||
let fixture: ComponentFixture<OutboxComponent>
|
||||
|
||||
beforeEach(async () => {
|
||||
const acMock = {
|
||||
notif: {
|
||||
outbox: {
|
||||
getSent: jasmine.createSpy("getSent").and.returnValue(of())
|
||||
}
|
||||
}
|
||||
getSent: jasmine.createSpy('getSent').and.returnValue(of()),
|
||||
},
|
||||
},
|
||||
}
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [OutboxComponent],
|
||||
providers: [
|
||||
{provide: AdminCommService, useValue: acMock}
|
||||
],
|
||||
imports: [
|
||||
RouterModule.forRoot([])
|
||||
]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(OutboxComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
providers: [{ provide: AdminCommService, useValue: acMock }],
|
||||
imports: [RouterModule.forRoot([])],
|
||||
}).compileComponents()
|
||||
|
||||
fixture = TestBed.createComponent(OutboxComponent)
|
||||
component = fixture.componentInstance
|
||||
fixture.detectChanges()
|
||||
})
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
expect(component).toBeTruthy()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,38 +1,41 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AdminCommService } from '../../admin-comm.service';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ToolbarService } from '../../toolbar/toolbar.service';
|
||||
import { DateTime } from 'luxon';
|
||||
import { Component, OnInit } from '@angular/core'
|
||||
import { AdminCommService } from '../../admin-comm.service'
|
||||
import { Router, ActivatedRoute } from '@angular/router'
|
||||
import { ToolbarService } from '../../toolbar/toolbar.service'
|
||||
import { DateTime } from 'luxon'
|
||||
|
||||
@Component({
|
||||
selector: 'app-outbox',
|
||||
templateUrl: './outbox.component.html',
|
||||
styleUrl: './outbox.component.scss',
|
||||
standalone: false
|
||||
selector: 'app-outbox',
|
||||
templateUrl: './outbox.component.html',
|
||||
styleUrl: './outbox.component.scss',
|
||||
standalone: false,
|
||||
})
|
||||
export class OutboxComponent implements OnInit {
|
||||
|
||||
messages!: {
|
||||
_id: string;
|
||||
sentDate: DateTime;
|
||||
title: string;
|
||||
_id: string
|
||||
sentDate: DateTime
|
||||
title: string
|
||||
}[]
|
||||
|
||||
constructor (private readonly acs: AdminCommService, private toolbar: ToolbarService, private router: Router, private route: ActivatedRoute ) {
|
||||
constructor(
|
||||
private readonly acs: AdminCommService,
|
||||
private toolbar: ToolbarService,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute
|
||||
) {
|
||||
this.toolbar.comp = this
|
||||
this.toolbar.menu = [
|
||||
{ title: "Powiadomienia", fn: "goBack", icon: "arrow_back" }
|
||||
{ title: 'Powiadomienia', fn: 'goBack', icon: 'arrow_back' },
|
||||
]
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.router.navigate(['../'], {relativeTo: this.route})
|
||||
this.router.navigate(['../'], { relativeTo: this.route })
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.acs.notif.outbox.getSent().subscribe((v) => {
|
||||
this.acs.notif.outbox.getSent().subscribe(v => {
|
||||
this.messages = v
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user