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
|
||||
|
||||
Reference in New Issue
Block a user