Ver código fonte

empty form components and modal calls

master
Florian Eisenmenger 2 anos atrás
pai
commit
201db4730e
42 arquivos alterados com 380 adições e 12 exclusões
  1. +9
    -0
      matsen-tool/src/app/app-routing.module.ts
  2. +15
    -1
      matsen-tool/src/app/app.module.ts
  3. +1
    -1
      matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html
  4. +10
    -1
      matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts
  5. +2
    -0
      matsen-tool/src/app/contacts/contacts.component.html
  6. +4
    -0
      matsen-tool/src/app/documents/documents.component.html
  7. +11
    -2
      matsen-tool/src/app/documents/documents.component.ts
  8. +1
    -0
      matsen-tool/src/app/documents/new-document/new-document.component.html
  9. +0
    -0
      matsen-tool/src/app/documents/new-document/new-document.component.scss
  10. +23
    -0
      matsen-tool/src/app/documents/new-document/new-document.component.spec.ts
  11. +10
    -0
      matsen-tool/src/app/documents/new-document/new-document.component.ts
  12. +1
    -0
      matsen-tool/src/app/partners/new-partner/new-partner.component.html
  13. +0
    -0
      matsen-tool/src/app/partners/new-partner/new-partner.component.scss
  14. +23
    -0
      matsen-tool/src/app/partners/new-partner/new-partner.component.spec.ts
  15. +10
    -0
      matsen-tool/src/app/partners/new-partner/new-partner.component.ts
  16. +2
    -2
      matsen-tool/src/app/partners/partners-detail/partners-detail.component.html
  17. +12
    -0
      matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts
  18. +6
    -1
      matsen-tool/src/app/partners/partners.component.html
  19. +25
    -2
      matsen-tool/src/app/partners/partners.component.ts
  20. +1
    -0
      matsen-tool/src/app/postings/new-posting/new-posting.component.html
  21. +0
    -0
      matsen-tool/src/app/postings/new-posting/new-posting.component.scss
  22. +23
    -0
      matsen-tool/src/app/postings/new-posting/new-posting.component.spec.ts
  23. +10
    -0
      matsen-tool/src/app/postings/new-posting/new-posting.component.ts
  24. +3
    -0
      matsen-tool/src/app/postings/postings.component.html
  25. +0
    -0
      matsen-tool/src/app/postings/postings.component.scss
  26. +23
    -0
      matsen-tool/src/app/postings/postings.component.spec.ts
  27. +10
    -0
      matsen-tool/src/app/postings/postings.component.ts
  28. +1
    -0
      matsen-tool/src/app/products/new-product/new-product.component.html
  29. +0
    -0
      matsen-tool/src/app/products/new-product/new-product.component.scss
  30. +23
    -0
      matsen-tool/src/app/products/new-product/new-product.component.spec.ts
  31. +10
    -0
      matsen-tool/src/app/products/new-product/new-product.component.ts
  32. +4
    -0
      matsen-tool/src/app/products/products.component.html
  33. +11
    -1
      matsen-tool/src/app/products/products.component.ts
  34. +1
    -0
      matsen-tool/src/app/tasks/new-task/new-task.component.html
  35. +0
    -0
      matsen-tool/src/app/tasks/new-task/new-task.component.scss
  36. +23
    -0
      matsen-tool/src/app/tasks/new-task/new-task.component.spec.ts
  37. +10
    -0
      matsen-tool/src/app/tasks/new-task/new-task.component.ts
  38. +5
    -0
      matsen-tool/src/app/tasks/tasks.component.html
  39. +0
    -0
      matsen-tool/src/app/tasks/tasks.component.scss
  40. +23
    -0
      matsen-tool/src/app/tasks/tasks.component.spec.ts
  41. +27
    -0
      matsen-tool/src/app/tasks/tasks.component.ts
  42. +7
    -1
      matsen-tool/src/assets/i18n/de.json

+ 9
- 0
matsen-tool/src/app/app-routing.module.ts Ver arquivo

@@ -11,6 +11,7 @@ import {ProductsDetailComponent} from "@app/products/products-detail/products-de
import {DocumentsComponent} from "@app/documents/documents.component";
import {ContactsComponent} from "@app/contacts/contacts.component";
import {ContactsDetailComponent} from "@app/contacts/contacts-detail/contacts-detail.component";
import {TasksComponent} from "@app/tasks/tasks.component";

const accountModule = () => import('./account/account.module').then(x => x.AccountModule);
const usersModule = () => import('./users/users.module').then(x => x.UsersModule);
@@ -64,6 +65,14 @@ const routes: Routes = [
{path: ':id', component: ProductsDetailComponent, data: {dataType: 'product-detail'}},
]
},
{
path: 'tasks',
component: TwoColumnComponent,
canActivate: [AuthGuard],
children: [
{path: '', component: TasksComponent, data: {dataType: 'task'}},
]
},
{
path: 'documents',
component: TwoColumnComponent,


+ 15
- 1
matsen-tool/src/app/app.module.ts Ver arquivo

@@ -30,6 +30,13 @@ import {PropertyInterceptor} from "@app/_helpers/property.interceptor";
import {MatPaginatorModule} from "@angular/material/paginator";
import {MatSortModule} from "@angular/material/sort";
import {MatTableModule} from "@angular/material/table";
import { PostingsComponent } from './postings/postings.component';
import { NewPostingComponent } from './postings/new-posting/new-posting.component';
import { TasksComponent } from './tasks/tasks.component';
import { NewTaskComponent } from './tasks/new-task/new-task.component';
import { NewPartnerComponent } from './partners/new-partner/new-partner.component';
import { NewDocumentComponent } from './documents/new-document/new-document.component';
import { NewProductComponent } from './products/new-product/new-product.component';

export function apiConfigFactory(): Configuration {
const params: ConfigurationParameters = {
@@ -80,7 +87,14 @@ export function HttpLoaderFactory(http: HttpClient) {
PartnersDetailComponent,
NewContactComponent,
ContactsComponent,
ContactsDetailComponent
ContactsDetailComponent,
PostingsComponent,
NewPostingComponent,
TasksComponent,
NewTaskComponent,
NewPartnerComponent,
NewDocumentComponent,
NewProductComponent
],
providers: [
{provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true},


+ 1
- 1
matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html Ver arquivo

@@ -24,7 +24,7 @@
<div class="posts">
<div class="d-flex justify-content-between align-items-start">
<h2>Notizen</h2>
<button>Neue Notiz</button>
<button (click)="openModalNewPosting()">Neue Notiz</button>
</div>
<div *ngFor="let post of posts">
<div class="post mb-3">


+ 10
- 1
matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts Ver arquivo

@@ -5,6 +5,9 @@ import {Subscription} from "rxjs";
import {ActivatedRoute} from "@angular/router";
import {MatPaginator, MatPaginatorIntl, PageEvent} from "@angular/material/paginator";
import {MatTableDataSource} from "@angular/material/table";
import {NewPostingComponent} from "@app/postings/new-posting/new-posting.component";
import {ModalComponent} from "@app/_components/modal/modal.component";
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";

@Component({
selector: 'app-contacts-detail',
@@ -30,7 +33,8 @@ export class ContactsDetailComponent implements OnInit, AfterViewInit {
constructor(
private contactService: ContactService,
private route: ActivatedRoute,
private postService: PostService
private postService: PostService,
private modalService: NgbModal
) {
this.id = "";
this.contact = {} as ContactJsonld;
@@ -94,4 +98,9 @@ export class ContactsDetailComponent implements OnInit, AfterViewInit {
this.postsPageSize = e.pageSize.valueOf();
this.getPostsData();
}

openModalNewPosting() {
const modalRef = this.modalService.open(ModalComponent);
modalRef.componentInstance.dynamicComponent = NewPostingComponent;
}
}

+ 2
- 0
matsen-tool/src/app/contacts/contacts.component.html Ver arquivo

@@ -1 +1,3 @@
<p>contacts works!</p>
<!-- This page is not used at the moment -->
<!-- "all contacts" could be listed here -->

+ 4
- 0
matsen-tool/src/app/documents/documents.component.html Ver arquivo

@@ -1,3 +1,7 @@
<div class="d-flex justify-content-between align-items-start">
<h2>Dokumente</h2>
<button (click)="openModalNewDocument()">Neues Dokument</button>
</div>
<table mat-table [dataSource]="dataSource" matSort (matSortChange)="onSortChange($event)"
class="mat-elevation-z8">



+ 11
- 2
matsen-tool/src/app/documents/documents.component.ts Ver arquivo

@@ -6,8 +6,11 @@ import {PartnerJsonld} from "@app/core/api/v1";
import {Router, RouterLink, RouterLinkActive} from "@angular/router";
import {MatTableDataSource, MatTableModule} from "@angular/material/table";
import {OrderFilter} from "@app/_models/orderFilter";
import {ApiConverter} from "@app/_helpers/api.converter";
import {NgIf} from "@angular/common";
import {ModalComponent} from "@app/_components/modal/modal.component";
import {NewPartnerComponent} from "@app/partners/new-partner/new-partner.component";
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";
import {NewDocumentComponent} from "@app/documents/new-document/new-document.component";

@Component({
selector: 'app-documents',
@@ -33,7 +36,8 @@ export class DocumentsComponent {
protected pageIndex: number;

constructor(
private router: Router
private router: Router,
private modalService: NgbModal
) {
this.sort = new MatSort();
this.paginator = new MatPaginator(new MatPaginatorIntl(), ChangeDetectorRef.prototype);
@@ -121,4 +125,9 @@ export class DocumentsComponent {
// console.log(ApiConverter.extractId(partner.id));
// this.router.navigate(['/documents', ApiConverter.extractId(partner.id)]);
}

openModalNewDocument() {
const modalRef = this.modalService.open(ModalComponent);
modalRef.componentInstance.dynamicComponent = NewDocumentComponent;
}
}

+ 1
- 0
matsen-tool/src/app/documents/new-document/new-document.component.html Ver arquivo

@@ -0,0 +1 @@
<p>new-document works!</p>

+ 0
- 0
matsen-tool/src/app/documents/new-document/new-document.component.scss Ver arquivo


+ 23
- 0
matsen-tool/src/app/documents/new-document/new-document.component.spec.ts Ver arquivo

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { NewDocumentComponent } from './new-document.component';

describe('NewDocumentComponent', () => {
let component: NewDocumentComponent;
let fixture: ComponentFixture<NewDocumentComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [NewDocumentComponent]
})
.compileComponents();
fixture = TestBed.createComponent(NewDocumentComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
matsen-tool/src/app/documents/new-document/new-document.component.ts Ver arquivo

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-new-document',
templateUrl: './new-document.component.html',
styleUrl: './new-document.component.scss'
})
export class NewDocumentComponent {

}

+ 1
- 0
matsen-tool/src/app/partners/new-partner/new-partner.component.html Ver arquivo

@@ -0,0 +1 @@
<p>new-partner works!</p>

+ 0
- 0
matsen-tool/src/app/partners/new-partner/new-partner.component.scss Ver arquivo


+ 23
- 0
matsen-tool/src/app/partners/new-partner/new-partner.component.spec.ts Ver arquivo

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { NewPartnerComponent } from './new-partner.component';

describe('NewPartnerComponent', () => {
let component: NewPartnerComponent;
let fixture: ComponentFixture<NewPartnerComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [NewPartnerComponent]
})
.compileComponents();
fixture = TestBed.createComponent(NewPartnerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
matsen-tool/src/app/partners/new-partner/new-partner.component.ts Ver arquivo

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-new-partner',
templateUrl: './new-partner.component.html',
styleUrl: './new-partner.component.scss'
})
export class NewPartnerComponent {

}

+ 2
- 2
matsen-tool/src/app/partners/partners-detail/partners-detail.component.html Ver arquivo

@@ -83,7 +83,7 @@
<div class="posts spt-accordion">
<div class="d-flex justify-content-between align-items-start">
<h2>Aufgaben</h2>
<button>Neue Aufgabe</button>
<button (click)="openModalNewTask()">Neue Aufgabe</button>
</div>
<div class="card mb-3 p-3">
<div class="position-relative" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
@@ -128,7 +128,7 @@
<div class="posts">
<div class="d-flex justify-content-between align-items-start">
<h2>Notizen</h2>
<button>Neue Notiz</button>
<button (click)="openModalNewPosting()">Neue Notiz</button>
</div>
<div *ngFor="let post of posts">
<div class="post mb-3">


+ 12
- 0
matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts Ver arquivo

@@ -9,6 +9,8 @@ import {environment} from "@environments/environment";
import {ApiConverter} from "@app/_helpers/api.converter";
import {MatPaginator, MatPaginatorIntl, PageEvent} from "@angular/material/paginator";
import {MatTableDataSource} from "@angular/material/table";
import {NewPostingComponent} from "@app/postings/new-posting/new-posting.component";
import {NewTaskComponent} from "@app/tasks/new-task/new-task.component";

@Component({
selector: 'app-partners-detail',
@@ -96,6 +98,16 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {
modalRef.componentInstance.dynamicComponent = NewContactComponent;
}

openModalNewPosting() {
const modalRef = this.modalService.open(ModalComponent);
modalRef.componentInstance.dynamicComponent = NewPostingComponent;
}

openModalNewTask() {
const modalRef = this.modalService.open(ModalComponent);
modalRef.componentInstance.dynamicComponent = NewTaskComponent;
}

ngOnInit() {
this.route.params.subscribe(params => {
this.id = params['id'];


+ 6
- 1
matsen-tool/src/app/partners/partners.component.html Ver arquivo

@@ -1,3 +1,7 @@
<div class="d-flex justify-content-between align-items-start">
<h2>{{ partnerName }}</h2>
<button (click)="openModalNewPartner()">Neuer {{ partnerNameOne }}</button>
</div>
<table mat-table [dataSource]="dataSource" matSort (matSortChange)="onSortChange($event)"
class="mat-elevation-z8">

@@ -14,7 +18,8 @@
<th mat-header-cell *matHeaderCellDef mat-sort-header sortActionDescription="Nach Partner sortieren">
Partner
</th>
<td mat-cell *matCellDef="let element"><span (click)="navigateToPartnerDetails(element)">{{ element.name }}</span></td>
<td mat-cell *matCellDef="let element"><span
(click)="navigateToPartnerDetails(element)">{{ element.name }}</span></td>
</ng-container>

<ng-container matColumnDef="address">


+ 25
- 2
matsen-tool/src/app/partners/partners.component.ts Ver arquivo

@@ -8,13 +8,17 @@ import {MatPaginator, MatPaginatorIntl, MatPaginatorModule, PageEvent} from "@an
import {OrderFilter} from "@app/_models/orderFilter";
import {ApiConverter} from "@app/_helpers/api.converter";
import {NgIf} from "@angular/common";
import {ModalComponent} from "@app/_components/modal/modal.component";
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";
import {NewPartnerComponent} from "@app/partners/new-partner/new-partner.component";
import {TranslateModule, TranslateService} from "@ngx-translate/core";

@Component({
selector: 'app-partners',
templateUrl: './partners.component.html',
styleUrl: './partners.component.scss',
standalone: true,
imports: [MatTableModule, MatSortModule, MatPaginatorModule, RouterLink, RouterLinkActive, NgIf],
imports: [MatTableModule, MatSortModule, MatPaginatorModule, RouterLink, RouterLinkActive, NgIf, TranslateModule],
})
export class PartnersComponent implements OnInit, AfterViewInit {
@ViewChild(MatSort) sort;
@@ -28,6 +32,8 @@ export class PartnersComponent implements OnInit, AfterViewInit {
protected websiteOrderAsc: OrderFilter;

protected dataType!: string;
protected partnerName: string;
protected partnerNameOne: string;
protected displayedColumns: string[];

protected dataSource;
@@ -39,7 +45,9 @@ export class PartnersComponent implements OnInit, AfterViewInit {
constructor(
private route: ActivatedRoute,
private partnerService: PartnerService,
private router: Router
private router: Router,
private modalService: NgbModal,
private translateService: TranslateService
) {
this.sort = new MatSort();
this.paginator = new MatPaginator(new MatPaginatorIntl(), ChangeDetectorRef.prototype);
@@ -57,10 +65,20 @@ export class PartnersComponent implements OnInit, AfterViewInit {
this.pageEvent = new PageEvent();
this.pageSize = 10;
this.pageIndex = 0;

this.partnerName = "";
this.partnerNameOne = "";
}

ngOnInit() {
this.dataType = this.route.snapshot.data['dataType'];
// this.translateService.use(this.translateService.getDefaultLang());
this.translateService.get('basic.' + this.dataType).subscribe((translation: string) => {
this.partnerName = translation;
});
this.translateService.get('basic.' + this.dataType + 'One').subscribe((translation: string) => {
this.partnerNameOne = translation;
});
this.getData();
}

@@ -133,4 +151,9 @@ export class PartnersComponent implements OnInit, AfterViewInit {
console.log(ApiConverter.extractId(partner.id));
this.router.navigate(['/' + partner.type, ApiConverter.extractId(partner.id)]);
}

openModalNewPartner() {
const modalRef = this.modalService.open(ModalComponent);
modalRef.componentInstance.dynamicComponent = NewPartnerComponent;
}
}

+ 1
- 0
matsen-tool/src/app/postings/new-posting/new-posting.component.html Ver arquivo

@@ -0,0 +1 @@
<p>new-posting works!</p>

+ 0
- 0
matsen-tool/src/app/postings/new-posting/new-posting.component.scss Ver arquivo


+ 23
- 0
matsen-tool/src/app/postings/new-posting/new-posting.component.spec.ts Ver arquivo

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { NewPostingComponent } from './new-posting.component';

describe('NewPostingComponent', () => {
let component: NewPostingComponent;
let fixture: ComponentFixture<NewPostingComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [NewPostingComponent]
})
.compileComponents();
fixture = TestBed.createComponent(NewPostingComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
matsen-tool/src/app/postings/new-posting/new-posting.component.ts Ver arquivo

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-new-posting',
templateUrl: './new-posting.component.html',
styleUrl: './new-posting.component.scss'
})
export class NewPostingComponent {

}

+ 3
- 0
matsen-tool/src/app/postings/postings.component.html Ver arquivo

@@ -0,0 +1,3 @@
<p>postings works!</p>
<!-- This page is not used at the moment -->
<!-- "all postings" could be listed here -->

+ 0
- 0
matsen-tool/src/app/postings/postings.component.scss Ver arquivo


+ 23
- 0
matsen-tool/src/app/postings/postings.component.spec.ts Ver arquivo

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { PostingsComponent } from './postings.component';

describe('PostingsComponent', () => {
let component: PostingsComponent;
let fixture: ComponentFixture<PostingsComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [PostingsComponent]
})
.compileComponents();
fixture = TestBed.createComponent(PostingsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
matsen-tool/src/app/postings/postings.component.ts Ver arquivo

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-postings',
templateUrl: './postings.component.html',
styleUrl: './postings.component.scss'
})
export class PostingsComponent {

}

+ 1
- 0
matsen-tool/src/app/products/new-product/new-product.component.html Ver arquivo

@@ -0,0 +1 @@
<p>new-product works!</p>

+ 0
- 0
matsen-tool/src/app/products/new-product/new-product.component.scss Ver arquivo


+ 23
- 0
matsen-tool/src/app/products/new-product/new-product.component.spec.ts Ver arquivo

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { NewProductComponent } from './new-product.component';

describe('NewProductComponent', () => {
let component: NewProductComponent;
let fixture: ComponentFixture<NewProductComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [NewProductComponent]
})
.compileComponents();
fixture = TestBed.createComponent(NewProductComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
matsen-tool/src/app/products/new-product/new-product.component.ts Ver arquivo

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-new-product',
templateUrl: './new-product.component.html',
styleUrl: './new-product.component.scss'
})
export class NewProductComponent {

}

+ 4
- 0
matsen-tool/src/app/products/products.component.html Ver arquivo

@@ -1,3 +1,7 @@
<div class="d-flex justify-content-between align-items-start">
<h2>Produkte</h2>
<button (click)="openModalNewProduct()">Neues Produkt</button>
</div>
<table mat-table [dataSource]="dataSource" matSort (matSortChange)="onSortChange($event)"
class="mat-elevation-z8">



+ 11
- 1
matsen-tool/src/app/products/products.component.ts Ver arquivo

@@ -8,6 +8,10 @@ import {ApiConverter} from "@app/_helpers/api.converter";
import {Router, RouterLink, RouterLinkActive} from "@angular/router";
import {NgIf} from "@angular/common";
import {Subscription} from "rxjs";
import {ModalComponent} from "@app/_components/modal/modal.component";
import {NewTaskComponent} from "@app/tasks/new-task/new-task.component";
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";
import {NewProductComponent} from "@app/products/new-product/new-product.component";

@Component({
selector: 'app-products',
@@ -33,7 +37,8 @@ export class ProductsComponent implements OnInit, AfterViewInit {
protected pageIndex: number;

constructor(
private router: Router
private router: Router,
private modalService: NgbModal
) {
this.sort = new MatSort();
this.paginator = new MatPaginator(new MatPaginatorIntl(), ChangeDetectorRef.prototype);
@@ -122,4 +127,9 @@ export class ProductsComponent implements OnInit, AfterViewInit {
// this.router.navigate(['/products', ApiConverter.extractId(product.id)]);
this.router.navigate(['/products', '1']);
}

openModalNewProduct() {
const modalRef = this.modalService.open(ModalComponent);
modalRef.componentInstance.dynamicComponent = NewProductComponent;
}
}

+ 1
- 0
matsen-tool/src/app/tasks/new-task/new-task.component.html Ver arquivo

@@ -0,0 +1 @@
<p>new-task works!</p>

+ 0
- 0
matsen-tool/src/app/tasks/new-task/new-task.component.scss Ver arquivo


+ 23
- 0
matsen-tool/src/app/tasks/new-task/new-task.component.spec.ts Ver arquivo

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { NewTaskComponent } from './new-task.component';

describe('NewTaskComponent', () => {
let component: NewTaskComponent;
let fixture: ComponentFixture<NewTaskComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [NewTaskComponent]
})
.compileComponents();
fixture = TestBed.createComponent(NewTaskComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
matsen-tool/src/app/tasks/new-task/new-task.component.ts Ver arquivo

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-new-task',
templateUrl: './new-task.component.html',
styleUrl: './new-task.component.scss'
})
export class NewTaskComponent {

}

+ 5
- 0
matsen-tool/src/app/tasks/tasks.component.html Ver arquivo

@@ -0,0 +1,5 @@
<div class="d-flex justify-content-between align-items-start">
<h2>Aufgaben</h2>
<button (click)="openModalNewTask()">Neue Aufgabe</button>
</div>
<p>tasks works!</p>

+ 0
- 0
matsen-tool/src/app/tasks/tasks.component.scss Ver arquivo


+ 23
- 0
matsen-tool/src/app/tasks/tasks.component.spec.ts Ver arquivo

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { TasksComponent } from './tasks.component';

describe('TasksComponent', () => {
let component: TasksComponent;
let fixture: ComponentFixture<TasksComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [TasksComponent]
})
.compileComponents();
fixture = TestBed.createComponent(TasksComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 27
- 0
matsen-tool/src/app/tasks/tasks.component.ts Ver arquivo

@@ -0,0 +1,27 @@
import {Component, OnInit} from '@angular/core';
import {NewTaskComponent} from "@app/tasks/new-task/new-task.component";
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";
import {ModalComponent} from "@app/_components/modal/modal.component";

@Component({
selector: 'app-tasks',
templateUrl: './tasks.component.html',
styleUrl: './tasks.component.scss'
})
export class TasksComponent implements OnInit {

constructor(
private modalService: NgbModal
) {

}

ngOnInit() {

}

openModalNewTask() {
const modalRef = this.modalService.open(ModalComponent);
modalRef.componentInstance.dynamicComponent = NewTaskComponent;
}
}

+ 7
- 1
matsen-tool/src/assets/i18n/de.json Ver arquivo

@@ -2,6 +2,12 @@
"basic":
{
"logout": "Logout",
"company-name": "MATSEN CHEMIE AG"
"company-name": "MATSEN CHEMIE AG",
"customer": "Kunden",
"supplier": "Dienstleister",
"service": "Lieferanten",
"customerOne": "Kunde",
"supplierOne": "Dienstleister",
"serviceOne": "Lieferant"
}
}

Carregando…
Cancelar
Salvar