Skip to content
Snippets Groups Projects
Commit 3b18d3c0 authored by OZGCloud's avatar OZGCloud
Browse files

Merge branch 'master' of git.ozg-sh.de:mgm/goofy

parents ebf1f9fd 1bee72e9
Branches
Tags
No related merge requests found
Showing
with 186 additions and 5 deletions
......@@ -3,6 +3,7 @@ import { CreateCommand } from '@goofy-client/command-shared';
export interface PostfachMessage {
receiver: string;
subject: string;
message: string;
reply: PostfachMessageReply;
}
......
......@@ -4,7 +4,8 @@ import { PostfachMessage, PostfachMessageReply } from '../src/lib/postfach-messa
export function createPostfachMessage(): PostfachMessage {
return {
receiver: faker.internet.email(),
subject: faker.random.words(10),
subject: faker.random.words(3),
message: faker.random.words(30),
reply: PostfachMessageReply.POSSIBLE
}
}
<goofy-client-expansion-panel headline="Nachrichten"></goofy-client-expansion-panel>
<goofy-client-expansion-panel headline="Nachrichten">
<!--goofy-client-postfach-message-list class="list" [messageBlockList]="[[1,2,3], '2', [5,6,3,2], 4]"></goofy-client-postfach-message-list-->
</goofy-client-expansion-panel>
<goofy-client-new-postfach-message-icon-button-container *ngIf="vorgang | hasLink: vorgangHeaderLinkRel.SEND_POSTFACH_MESSAGE"
[vorgang]="vorgang">
</goofy-client-new-postfach-message-icon-button-container>
......@@ -4,6 +4,7 @@ import { MockComponent } from 'ng-mocks';
import { ExpansionPanelComponent } from '@goofy-client/ui';
import { NewPostfachMessageIconButtonContainerComponent } from '@goofy-client/postfach-message';
import { HasLinkPipe } from '@goofy-client/tech-shared';
import { PostfachMessageListComponent } from './postfach-message-list/postfach-message-list.component';
describe('PostfachMessageListContainerComponent', () => {
let component: PostfachMessageListContainerComponent;
......@@ -15,6 +16,7 @@ describe('PostfachMessageListContainerComponent', () => {
PostfachMessageListContainerComponent,
HasLinkPipe,
MockComponent(ExpansionPanelComponent),
MockComponent(PostfachMessageListComponent),
MockComponent(NewPostfachMessageIconButtonContainerComponent)
]
})
......
<goofy-client-postfach-message *ngFor="let message of messageBlock"></goofy-client-postfach-message>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PostfachMessageBlockComponent } from './postfach-message-block.component';
import { MockComponent } from 'ng-mocks';
import { PostfachMessageComponent } from './postfach-message/postfach-message.component';
describe('PostfachMessageBlockComponent', () => {
let component: PostfachMessageBlockComponent;
let fixture: ComponentFixture<PostfachMessageBlockComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
PostfachMessageBlockComponent,
MockComponent(PostfachMessageComponent)
]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(PostfachMessageBlockComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'goofy-client-postfach-message-block',
templateUrl: './postfach-message-block.component.html',
styleUrls: ['./postfach-message-block.component.scss']
})
export class PostfachMessageBlockComponent {
@Input() messageBlock: [];
}
<div class="line">
<div class="receiver">Max Mustermann</div>
</div>
<div class="line">
<div class="subject">Fehlende Unterlagen</div>
<div class="date">28.2.2022</div>
</div>
<div class="message">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</div>
:host {
display: flex;
flex-direction: column;
margin-bottom: 16px;
.line {
display: flex;
justify-content: space-between;
}
.message {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.receiver {
font-weight: 500;
}
.date {
font-size: 12px;
color: rgba(#000, 0.4);
}
.message {
color: rgba(#000, 0.4);
}
}
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PostfachMessageComponent } from './postfach-message.component';
describe('PostfachMessageComponent', () => {
let component: PostfachMessageComponent;
let fixture: ComponentFixture<PostfachMessageComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PostfachMessageComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(PostfachMessageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'goofy-client-postfach-message',
templateUrl: './postfach-message.component.html',
styleUrls: ['./postfach-message.component.scss']
})
export class PostfachMessageComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
<goofy-client-postfach-message-block *ngFor="let messageBlock of messageBlockList"
[messageBlock]="messageBlock">
</goofy-client-postfach-message-block>
:host {
margin-right: 8px;
display: block;
}
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PostfachMessageListComponent } from './postfach-message-list.component';
import { MockComponent } from 'ng-mocks';
import { PostfachMessageBlockComponent } from './postfach-message-block/postfach-message-block.component';
describe('PostfachMessageListComponent', () => {
let component: PostfachMessageListComponent;
let fixture: ComponentFixture<PostfachMessageListComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
PostfachMessageListComponent,
MockComponent(PostfachMessageBlockComponent)
]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(PostfachMessageListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'goofy-client-postfach-message-list',
templateUrl: './postfach-message-list.component.html',
styleUrls: ['./postfach-message-list.component.scss']
})
export class PostfachMessageListComponent {
@Input() messageBlockList: [];
}
......@@ -5,6 +5,9 @@ import { UiModule } from '@goofy-client/ui';
import { NewPostfachMessageIconButtonContainerComponent } from './new-postfach-message-icon-button-container/new-postfach-message-icon-button-container.component';
import { NewPostfachMessageFormComponent } from './new-postfach-message-form/new-postfach-message-form.component';
import { PostfachMessageSharedModule } from '@goofy-client/postfach-message-shared';
import { PostfachMessageListComponent } from './postfach-message-list-container/postfach-message-list/postfach-message-list.component';
import { PostfachMessageComponent } from './postfach-message-list-container/postfach-message-list/postfach-message-block/postfach-message/postfach-message.component';
import { PostfachMessageBlockComponent } from './postfach-message-list-container/postfach-message-list/postfach-message-block/postfach-message-block.component';
@NgModule({
imports: [
......@@ -15,7 +18,10 @@ import { PostfachMessageSharedModule } from '@goofy-client/postfach-message-shar
declarations: [
PostfachMessageListContainerComponent,
NewPostfachMessageIconButtonContainerComponent,
NewPostfachMessageFormComponent
NewPostfachMessageFormComponent,
PostfachMessageListComponent,
PostfachMessageComponent,
PostfachMessageBlockComponent
],
exports: [
PostfachMessageListContainerComponent,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment