-
+
{{ task.dueAt | date:'dd.MM.YYYY':'GMT+0000' }}
{{ task.headline }}
-
+
Zugewiesen an: {{ task.assignedToName }}
diff --git a/matsen-tool/src/app/_views/home/home.component.ts b/matsen-tool/src/app/_views/home/home.component.ts
index de9508c..bfa51a8 100644
--- a/matsen-tool/src/app/_views/home/home.component.ts
+++ b/matsen-tool/src/app/_views/home/home.component.ts
@@ -18,7 +18,7 @@ import {MatTableDataSource} from "@angular/material/table";
import {NewTaskComponent} from "@app/_views/tasks/new-task/new-task.component";
import {ModalStatus} from "@app/_helpers/modal.states";
import {NewTaskNoteComponent} from "@app/_views/tasks/new-task-note/new-task-note.component";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
@Component({
templateUrl: 'home.component.html',
@@ -56,7 +56,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
private postService: PostService,
private userService: UserService,
private taskService: TaskService,
- protected apiHelperService: ApiHelperService
+ protected appHelperService: AppHelperService
) {
this.user = this.accountService.userValue;
// this.accountService.user.subscribe(x => this.user = x);
@@ -128,7 +128,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
}
openModalNewTask() {
- const modalRefTask = this.modalService.open(NewTaskComponent, this.modalOptions);
+ const modalRefTask = this.modalService.open(NewTaskComponent, this.appHelperService.getModalOptions());
let task: TaskJsonld = {} as TaskJsonld;
task.partner = null;
task.completed = false;
@@ -142,7 +142,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
}
openModalNewTaskNote(task: TaskJsonld) {
- const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.modalOptions);
+ const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.appHelperService.getModalOptions());
let taskNote: TaskNoteJsonld = {} as TaskNoteJsonld;
taskNote.task = task.id ?? null;
modalRefTaskNote.componentInstance.taskNote = taskNote;
@@ -155,9 +155,9 @@ export class HomeComponent implements OnInit, AfterViewInit {
}
openModalEditTask(task: TaskJsonld) {
- const modalRefTaskEdit = this.modalService.open(NewTaskComponent, this.modalOptions);
+ const modalRefTaskEdit = this.modalService.open(NewTaskComponent, this.appHelperService.getModalOptions());
modalRefTaskEdit.componentInstance.task = task;
- modalRefTaskEdit.componentInstance.dueAtValue = this.apiHelperService.convertDate(task.dueAt);
+ modalRefTaskEdit.componentInstance.dueAtValue = this.appHelperService.convertDate(task.dueAt);
modalRefTaskEdit.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRefTaskEdit.dismiss();
@@ -167,7 +167,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
}
openModalEditTaskNote(taskNote: TaskNoteJsonld) {
- const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.modalOptions);
+ const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.appHelperService.getModalOptions());
modalRefTaskNote.componentInstance.taskNote = taskNote;
modalRefTaskNote.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
diff --git a/matsen-tool/src/app/_views/partners/new-partner/new-partner.component.ts b/matsen-tool/src/app/_views/partners/new-partner/new-partner.component.ts
index 74fa557..4c22ef9 100644
--- a/matsen-tool/src/app/_views/partners/new-partner/new-partner.component.ts
+++ b/matsen-tool/src/app/_views/partners/new-partner/new-partner.component.ts
@@ -6,7 +6,7 @@ import {FormGroup} from "@angular/forms";
import {Subscription} from "rxjs";
import {TranslateService} from "@ngx-translate/core";
import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
@Component({
selector: 'app-new-partner',
@@ -29,7 +29,7 @@ export class NewPartnerComponent implements OnInit {
private partnerService: PartnerService,
private mediaObjectService: MediaObjectService,
private translateService: TranslateService,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
this.partnerForm = partnerForm;
this.selectedImage = null;
@@ -79,7 +79,7 @@ export class NewPartnerComponent implements OnInit {
} else {
// Edit contact
this.partnerSub = this.partnerService.partnersIdPatch(
- this.apiHelperService.extractId(this.partner.id),
+ this.appHelperService.extractId(this.partner.id),
this.partnerForm.value as PartnerJsonld
).subscribe(
data => {
diff --git a/matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html b/matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html
index 2042ca8..b01470a 100644
--- a/matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html
+++ b/matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html
@@ -42,13 +42,13 @@
diff --git a/matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts b/matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts
index 9fed827..79acf97 100644
--- a/matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts
+++ b/matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts
@@ -8,7 +8,7 @@ import {
} from "@app/core/api/v1";
import {Subscription} from "rxjs";
import {environment} from "@environments/environment";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {ModalStatus} from "@app/_helpers/modal.states";
import {AccountService} from "@app/_services";
import {User} from "@app/_models";
@@ -54,7 +54,7 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {
private partnerService: PartnerService,
private partnerProductService: PartnerProductService,
private partnerFollowService: PartnerFollowService,
- protected apiHelperService: ApiHelperService
+ protected appHelperService: AppHelperService
) {
this.partnerDetailSub = new Subscription();
@@ -102,7 +102,7 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {
}
openModalEditPartner() {
- const modalRef = this.modalService.open(NewPartnerComponent, this.modalOptions);
+ const modalRef = this.modalService.open(NewPartnerComponent, this.appHelperService.getModalOptions());
modalRef.componentInstance.partner = this.partner;
modalRef.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
@@ -144,7 +144,7 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {
);
} else {
this.partnerFollowSub = this.partnerFollowService.partnerFollowsIdDelete(
- this.apiHelperService.extractId(this.partnerFollow.id)
+ this.appHelperService.extractId(this.partnerFollow.id)
).subscribe(
data => {
this.partnerFollow = null;
diff --git a/matsen-tool/src/app/_views/partners/partners.component.ts b/matsen-tool/src/app/_views/partners/partners.component.ts
index 9ed7315..d006f4b 100644
--- a/matsen-tool/src/app/_views/partners/partners.component.ts
+++ b/matsen-tool/src/app/_views/partners/partners.component.ts
@@ -6,7 +6,7 @@ import {Subscription} from "rxjs";
import {PartnerJsonld, PartnerService} from "@app/core/api/v1";
import {MatPaginator, MatPaginatorIntl, MatPaginatorModule, PageEvent} from "@angular/material/paginator";
import {OrderFilter} from "@app/_models/orderFilter";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {NgIf} from "@angular/common";
import {NgbModal, NgbModalOptions} from "@ng-bootstrap/ng-bootstrap";
import {NewPartnerComponent} from "@app/_views/partners/new-partner/new-partner.component";
@@ -53,7 +53,7 @@ export class PartnersComponent implements OnInit, AfterViewInit {
private router: Router,
private modalService: NgbModal,
private translateService: TranslateService,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
this.partnersSort = new MatSort();
this.partnersPaginator = new MatPaginator(new MatPaginatorIntl(), ChangeDetectorRef.prototype);
@@ -153,11 +153,11 @@ export class PartnersComponent implements OnInit, AfterViewInit {
navigateToPartnerDetails(element: any) {
const partner: PartnerJsonld = element as PartnerJsonld;
- this.router.navigate(['/' + partner.partnerType, this.apiHelperService.extractId(partner.id)]);
+ this.router.navigate(['/' + partner.partnerType, this.appHelperService.extractId(partner.id)]);
}
openModalNewPartner() {
- const modalRefContact = this.modalService.open(NewPartnerComponent, this.modalOptions);
+ const modalRefContact = this.modalService.open(NewPartnerComponent, this.appHelperService.getModalOptions());
let partner: PartnerJsonld = {} as PartnerJsonld;
partner.partnerType = this.dataType as TypeEnum;
modalRefContact.componentInstance.partner = partner;
diff --git a/matsen-tool/src/app/_views/posts/new-comment/new-comment.component.ts b/matsen-tool/src/app/_views/posts/new-comment/new-comment.component.ts
index a256c24..460d43a 100644
--- a/matsen-tool/src/app/_views/posts/new-comment/new-comment.component.ts
+++ b/matsen-tool/src/app/_views/posts/new-comment/new-comment.component.ts
@@ -5,7 +5,7 @@ import {Subscription} from "rxjs";
import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer";
import {FormGroup} from "@angular/forms";
import {commentForm} from "@app/_forms/apiForms";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
@Component({
selector: 'app-new-comment',
@@ -21,7 +21,7 @@ export class NewCommentComponent implements OnInit {
constructor(
private commentService: CommentService,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
this.commentForm = commentForm;
this.commentSub = new Subscription();
@@ -46,7 +46,7 @@ export class NewCommentComponent implements OnInit {
} else {
// Edit comment
this.commentSub = this.commentService.commentsIdPatch(
- this.apiHelperService.extractId(this.comment.id),
+ this.appHelperService.extractId(this.comment.id),
this.commentForm.value as CommentJsonld
).subscribe(
data => {
diff --git a/matsen-tool/src/app/_views/posts/new-post/new-post.component.ts b/matsen-tool/src/app/_views/posts/new-post/new-post.component.ts
index 343817e..241f3ce 100644
--- a/matsen-tool/src/app/_views/posts/new-post/new-post.component.ts
+++ b/matsen-tool/src/app/_views/posts/new-post/new-post.component.ts
@@ -4,7 +4,7 @@ import {FormGroup} from "@angular/forms";
import {postForm} from "@app/_forms/apiForms";
import {PartnerJsonld, PostJsonld, PostService} from "@app/core/api/v1";
import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {Subscription} from "rxjs";
@Component({
@@ -21,7 +21,7 @@ export class NewPostComponent implements OnInit {
constructor(
private postService: PostService,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
this.postForm = postForm;
this.postSub = new Subscription();
@@ -47,7 +47,7 @@ export class NewPostComponent implements OnInit {
} else {
// Edit post
this.postSub = this.postService.postsIdPatch(
- this.apiHelperService.extractId(this.posting.id),
+ this.appHelperService.extractId(this.posting.id),
this.postForm.value as PostJsonld
).subscribe(
data => {
diff --git a/matsen-tool/src/app/_views/posts/post-list/post-list.component.html b/matsen-tool/src/app/_views/posts/post-list/post-list.component.html
index e98e93a..5506ea6 100644
--- a/matsen-tool/src/app/_views/posts/post-list/post-list.component.html
+++ b/matsen-tool/src/app/_views/posts/post-list/post-list.component.html
@@ -1,57 +1,54 @@
-
-
-
-
-
{{ post.createdAt | date:'dd.MM.YYYY' }}
-
{{ post.ownerName }}
-
-
-
{{ post.headline }}
-
-
-
-
-
-
-
+
+
+
-
{{ comment.createdAt | date:'dd.MM.YYYY' }}
-
{{ comment.ownerName }}
+
{{ post.createdAt | date:'dd.MM.YYYY' }}
+
{{ post.ownerName }}
-
+
{{ post.headline }}
+
+
+
+
+
+
+
+
+
+
{{ comment.createdAt | date:'dd.MM.YYYY' }}
+
{{ comment.ownerName }}
+
+
+
-
-
-
-
- {{ 'basic.hide-comments' | translate }}
- {{ 'basic.show-comments' | translate }}
-
-
{{ 'basic.comment-it' | translate }}
+
+
+ {{ 'basic.hide-comments' | translate }}
+ {{ 'basic.show-comments' | translate }}
+
+ {{ 'basic.comment-it' | translate }}
+
-
-
0" class="rounded-1"
- [pageSizeOptions]="this.pageSizeOptions"
- [length]="dataLength"
- (page)="handlePageEvent($event)"
- [pageSize]="pageSize"
- [pageIndex]="pageIndex"
- showFirstLastButtons>
-
+
\ No newline at end of file
diff --git a/matsen-tool/src/app/_views/posts/post-list/post-list.component.ts b/matsen-tool/src/app/_views/posts/post-list/post-list.component.ts
index 63f6f62..97a106b 100644
--- a/matsen-tool/src/app/_views/posts/post-list/post-list.component.ts
+++ b/matsen-tool/src/app/_views/posts/post-list/post-list.component.ts
@@ -4,7 +4,7 @@ import {
CommentJsonld,
ContactJsonld,
PartnerJsonld,
- PartnerProductJsonld, PartnerProductService,
+ PartnerProductJsonld,
PostJsonld,
PostService,
SaleJsonld, UserJsonld
@@ -14,16 +14,16 @@ import {MatTableDataSource} from "@angular/material/table";
import {NewPostComponent} from "@app/_views/posts/new-post/new-post.component";
import {ModalStatus} from "@app/_helpers/modal.states";
import {NgbModal, NgbModalOptions} from "@ng-bootstrap/ng-bootstrap";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {NewCommentComponent} from "@app/_views/posts/new-comment/new-comment.component";
-import {ListComponent} from "@app/_components/list/list.component";
+import {PagingComponent} from "@app/_components/paging/paging.component";
@Component({
selector: 'app-post-list',
templateUrl: './post-list.component.html',
styleUrl: './post-list.component.scss'
})
-export class PostListComponent extends ListComponent implements OnInit, AfterViewInit {
+export class PostListComponent implements OnInit, AfterViewInit {
@Input() public partner!: PartnerJsonld;
@Input() public contact!: ContactJsonld;
@@ -32,6 +32,7 @@ export class PostListComponent extends ListComponent implements OnInit, AfterVie
@Input() public existsContact!: boolean;
@Input() public existsSale!: boolean;
+ @ViewChild("pagingComponent", { static: false }) pagingComponent: PagingComponent = new PagingComponent();
@ViewChild(MatPaginator) postsPaginator: MatPaginator;
protected postsSub: Subscription;
@@ -40,13 +41,15 @@ export class PostListComponent extends ListComponent implements OnInit, AfterVie
protected partnerProducts: Array
;
protected postsDataSource;
protected commentsVisibility: Map;
+ protected modalOptions: NgbModalOptions = {
+ centered: true
+ };
constructor(
private postService: PostService,
private modalService: NgbModal,
- protected apiHelperService: ApiHelperService
+ protected appHelperService: AppHelperService
) {
- super();
this.postsSub = new Subscription();
this.posts = [];
this.partnerProductsSub = new Subscription();
@@ -64,10 +67,10 @@ export class PostListComponent extends ListComponent implements OnInit, AfterVie
this.postsDataSource.paginator = this.postsPaginator;
}
- override getData() {
+ getData = () => {
this.postsSub = this.postService.postsGetCollection(
- this.pageIndex + 1,
- this.pageSize,
+ this.pagingComponent.getPageIndex(),
+ this.pagingComponent.getPageSize(),
this.partner !== undefined ? this.partner.id : undefined,
undefined,
this.contact !== undefined ? this.contact.id : undefined,
@@ -81,7 +84,7 @@ export class PostListComponent extends ListComponent implements OnInit, AfterVie
).subscribe(
data => {
this.posts = data["hydra:member"];
- this.dataLength = Number(data["hydra:totalItems"]);
+ this.pagingComponent.dataLength = Number(data["hydra:totalItems"]);
this.posts.forEach(posts => {
if (posts.id) {
this.commentsVisibility.set(posts.id, false);
@@ -99,7 +102,7 @@ export class PostListComponent extends ListComponent implements OnInit, AfterVie
}
openModalNewPost() {
- const modalRefPosting = this.modalService.open(NewPostComponent, this.modalOptions);
+ const modalRefPosting = this.modalService.open(NewPostComponent, this.appHelperService.getModalOptions());
let posting: PostJsonld = {} as PostJsonld;
posting.partner = this.partner.id ?? null;
modalRefPosting.componentInstance.posting = posting;
@@ -112,7 +115,7 @@ export class PostListComponent extends ListComponent implements OnInit, AfterVie
}
openModalEditPost(post: PostJsonld) {
- const modalRefPostingEdit = this.modalService.open(NewPostComponent, this.modalOptions);
+ const modalRefPostingEdit = this.modalService.open(NewPostComponent, this.appHelperService.getModalOptions());
modalRefPostingEdit.componentInstance.posting = post;
modalRefPostingEdit.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
@@ -123,7 +126,7 @@ export class PostListComponent extends ListComponent implements OnInit, AfterVie
}
openModalEditComment(comment: CommentJsonld) {
- const modalRefComment = this.modalService.open(NewCommentComponent, this.modalOptions);
+ const modalRefComment = this.modalService.open(NewCommentComponent, this.appHelperService.getModalOptions());
modalRefComment.componentInstance.comment = comment;
modalRefComment.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
@@ -134,7 +137,7 @@ export class PostListComponent extends ListComponent implements OnInit, AfterVie
}
openModalNewComment(post: PostJsonld) {
- const modalRefComment = this.modalService.open(NewCommentComponent, this.modalOptions);
+ const modalRefComment = this.modalService.open(NewCommentComponent, this.appHelperService.getModalOptions());
let comment: CommentJsonld = {} as CommentJsonld;
comment.post = post.id ?? null;
modalRefComment.componentInstance.comment = comment;
diff --git a/matsen-tool/src/app/_views/products/new-product/new-product.component.ts b/matsen-tool/src/app/_views/products/new-product/new-product.component.ts
index a569c93..ba36dde 100644
--- a/matsen-tool/src/app/_views/products/new-product/new-product.component.ts
+++ b/matsen-tool/src/app/_views/products/new-product/new-product.component.ts
@@ -5,7 +5,7 @@ import {FormGroup} from "@angular/forms";
import {Subscription} from "rxjs";
import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer";
import {productForm} from "@app/_forms/apiForms";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {TranslateService} from "@ngx-translate/core";
@Component({
@@ -27,7 +27,7 @@ export class NewProductComponent implements OnInit {
private productService: ProductService,
private mediaObjectService: MediaObjectService,
private translateService: TranslateService,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
this.productForm = productForm;
this.productSub = new Subscription();
@@ -70,7 +70,7 @@ export class NewProductComponent implements OnInit {
} else {
// Edit product
this.productSub = this.productService.productsIdPatch(
- this.apiHelperService.extractId(this.product.id),
+ this.appHelperService.extractId(this.product.id),
this.productForm.value as ProductJsonld
).subscribe(
data => {
diff --git a/matsen-tool/src/app/_views/products/products-detail/products-detail.component.ts b/matsen-tool/src/app/_views/products/products-detail/products-detail.component.ts
index 10a038e..acebad3 100644
--- a/matsen-tool/src/app/_views/products/products-detail/products-detail.component.ts
+++ b/matsen-tool/src/app/_views/products/products-detail/products-detail.component.ts
@@ -13,7 +13,7 @@ import {NgbModal, NgbModalOptions} from "@ng-bootstrap/ng-bootstrap";
import {NewProductComponent} from "@app/_views/products/new-product/new-product.component";
import {User} from "@app/_models";
import {AccountService} from "@app/_services";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
@Component({
selector: 'app-products-detail',
@@ -40,7 +40,7 @@ export class ProductsDetailComponent implements OnInit, AfterViewInit {
private productService: ProductService,
private userProductService: UserProductService,
private modalService: NgbModal,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
this.id = "";
this.user = this.accountService.userValue;
@@ -105,7 +105,7 @@ export class ProductsDetailComponent implements OnInit, AfterViewInit {
);
} else {
this.userProductSub = this.userProductService.userProductsIdDelete(
- this.apiHelperService.extractId(this.userProduct.id)
+ this.appHelperService.extractId(this.userProduct.id)
).subscribe(
data => {
this.userProduct = null;
@@ -115,7 +115,7 @@ export class ProductsDetailComponent implements OnInit, AfterViewInit {
}
openModalEditProduct() {
- const modalRefProduct = this.modalService.open(NewProductComponent, this.modalOptions);
+ const modalRefProduct = this.modalService.open(NewProductComponent, this.appHelperService.getModalOptions());
modalRefProduct.componentInstance.product = this.product;
modalRefProduct.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
diff --git a/matsen-tool/src/app/_views/products/products.component.ts b/matsen-tool/src/app/_views/products/products.component.ts
index 64327ae..6b08046 100644
--- a/matsen-tool/src/app/_views/products/products.component.ts
+++ b/matsen-tool/src/app/_views/products/products.component.ts
@@ -4,7 +4,7 @@ import {MatPaginator, MatPaginatorIntl, MatPaginatorModule, PageEvent} from "@an
import {MatTableDataSource, MatTableModule} from "@angular/material/table";
import {ProductJsonld, ProductService} from "@app/core/api/v1";
import {OrderFilter} from "@app/_models/orderFilter";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {Router, RouterLink, RouterLinkActive} from "@angular/router";
import {NgIf} from "@angular/common";
import {Subscription} from "rxjs";
@@ -42,7 +42,7 @@ export class ProductsComponent implements OnInit, AfterViewInit {
private router: Router,
private modalService: NgbModal,
private productService: ProductService,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
this.sort = new MatSort();
this.displayedColumns = ['pos', 'image', 'name', 'storage', 'number'];
@@ -119,11 +119,11 @@ export class ProductsComponent implements OnInit, AfterViewInit {
navigateToProductDetails(element: any) {
const product: ProductJsonld = element as ProductJsonld;
- this.router.navigate(['/products', this.apiHelperService.extractId(product.id)]);
+ this.router.navigate(['/products', this.appHelperService.extractId(product.id)]);
}
openModalNewProduct() {
- const modalRefProduct = this.modalService.open(NewProductComponent, this.modalOptions);
+ const modalRefProduct = this.modalService.open(NewProductComponent, this.appHelperService.getModalOptions());
// TODO: Warum muss ich einen leeren String übergeben, damit es funktioniert?
let product: ProductJsonld = {} as ProductJsonld;
product.name = "";
diff --git a/matsen-tool/src/app/_views/profile/profile.component.ts b/matsen-tool/src/app/_views/profile/profile.component.ts
index d0924bf..1fd2e5e 100644
--- a/matsen-tool/src/app/_views/profile/profile.component.ts
+++ b/matsen-tool/src/app/_views/profile/profile.component.ts
@@ -4,7 +4,7 @@ import {Router} from "@angular/router";
import {AccountService} from "@app/_services";
import {Subscription} from "rxjs";
import {PartnerJsonld, UserJsonld, UserService} from "@app/core/api/v1";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
@Component({
selector: 'app-profile',
@@ -20,7 +20,7 @@ export class ProfileComponent implements OnInit {
private router: Router,
private accountService: AccountService,
private userService: UserService,
- protected apiHelperService: ApiHelperService
+ protected appHelperService: AppHelperService
) {
this.userSub = new Subscription();
this.user = {} as UserJsonld;
@@ -34,7 +34,7 @@ export class ProfileComponent implements OnInit {
const user = this.accountService.userValue;
if (user?.id !== null && user?.id !== undefined) {
this.userSub = this.userService.usersIdGet(
- this.apiHelperService.extractId(user.id)
+ this.appHelperService.extractId(user.id)
).subscribe(
data => {
this.user = data;
diff --git a/matsen-tool/src/app/_views/sales/new-sale/new-sale.component.ts b/matsen-tool/src/app/_views/sales/new-sale/new-sale.component.ts
index e487fe5..0ccb1c6 100644
--- a/matsen-tool/src/app/_views/sales/new-sale/new-sale.component.ts
+++ b/matsen-tool/src/app/_views/sales/new-sale/new-sale.component.ts
@@ -13,7 +13,7 @@ import {debounceTime, distinctUntilChanged, Observable, OperatorFunction, Subscr
import {TranslateService} from "@ngx-translate/core";
import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer";
import {saleForm} from "@app/_forms/apiForms";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {filter, map} from "rxjs/operators";
@Component({
@@ -35,7 +35,7 @@ export class NewSaleComponent implements OnInit {
private partnerService: PartnerService,
private productService: ProductService,
private translateService: TranslateService,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
this.saleForm = saleForm;
@@ -113,7 +113,7 @@ export class NewSaleComponent implements OnInit {
} else {
// Edit sale
this.saleSub = this.saleService.salesIdPatch(
- this.apiHelperService.extractId(this.sale.id),
+ this.appHelperService.extractId(this.sale.id),
this.saleForm.value as SaleJsonld
).subscribe(
data => {
diff --git a/matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.html b/matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.html
index 574972d..3902314 100644
--- a/matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.html
+++ b/matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.html
@@ -13,7 +13,7 @@
{{'overview.profit' | translate}}:
{{ sale.profit }}
{{'overview.comment' | translate}}:
-
+
@@ -36,7 +36,7 @@
@@ -50,7 +50,7 @@
{{ comment.ownerName }}
diff --git a/matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.ts b/matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.ts
index e6c5082..fa05d43 100644
--- a/matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.ts
+++ b/matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.ts
@@ -12,7 +12,7 @@ import {NewCommentComponent} from "@app/_views/posts/new-comment/new-comment.com
import {NewContactComponent} from "@app/_views/contacts/new-contact/new-contact.component";
import {NewSaleComponent} from "@app/_views/sales/new-sale/new-sale.component";
import {ActivatedRoute} from "@angular/router";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
@Component({
selector: 'app-sales-detail',
@@ -47,7 +47,7 @@ export class SalesDetailComponent implements OnInit, AfterViewInit {
private route: ActivatedRoute,
private postService: PostService,
private modalService: NgbModal,
- protected apiHelperService: ApiHelperService
+ protected appHelperService: AppHelperService
) {
this.user = this.accountService.userValue;
@@ -126,7 +126,7 @@ export class SalesDetailComponent implements OnInit, AfterViewInit {
}
openModalNewPosting() {
- const modalRefPosting = this.modalService.open(NewPostComponent, this.modalOptions);
+ const modalRefPosting = this.modalService.open(NewPostComponent, this.appHelperService.getModalOptions());
let posting: PostJsonld = {} as PostJsonld;
posting.sale = this.sale.id ?? null;
posting.partner = this.sale.partner ?? null;
@@ -141,7 +141,7 @@ export class SalesDetailComponent implements OnInit, AfterViewInit {
}
openModalNewComment(post: PostJsonld) {
- const modalRefComment = this.modalService.open(NewCommentComponent, this.modalOptions);
+ const modalRefComment = this.modalService.open(NewCommentComponent, this.appHelperService.getModalOptions());
let comment: CommentJsonld = {} as CommentJsonld;
comment.post = post.id ?? null;
modalRefComment.componentInstance.comment = comment;
@@ -154,7 +154,7 @@ export class SalesDetailComponent implements OnInit, AfterViewInit {
}
openModalEditPosting(post: PostJsonld) {
- const modalRefPostingEdit = this.modalService.open(NewPostComponent, this.modalOptions);
+ const modalRefPostingEdit = this.modalService.open(NewPostComponent, this.appHelperService.getModalOptions());
modalRefPostingEdit.componentInstance.posting = post;
modalRefPostingEdit.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
@@ -165,7 +165,7 @@ export class SalesDetailComponent implements OnInit, AfterViewInit {
}
openModalEditComment(comment: CommentJsonld) {
- const modalRefComment = this.modalService.open(NewCommentComponent, this.modalOptions);
+ const modalRefComment = this.modalService.open(NewCommentComponent, this.appHelperService.getModalOptions());
modalRefComment.componentInstance.comment = comment;
modalRefComment.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
@@ -176,7 +176,7 @@ export class SalesDetailComponent implements OnInit, AfterViewInit {
}
openModalEditSale() {
- const modalRefSale = this.modalService.open(NewSaleComponent, this.modalOptions);
+ const modalRefSale = this.modalService.open(NewSaleComponent, this.appHelperService.getModalOptions());
modalRefSale.componentInstance.sale = this.sale;
modalRefSale.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
diff --git a/matsen-tool/src/app/_views/sales/sales.component.html b/matsen-tool/src/app/_views/sales/sales.component.html
index 97ac289..59e0429 100644
--- a/matsen-tool/src/app/_views/sales/sales.component.html
+++ b/matsen-tool/src/app/_views/sales/sales.component.html
@@ -53,7 +53,7 @@
{{ 'overview.sale-partner' | translate }}
- {{ element.partnerName }}
+ {{ element.partnerName }}
|
@@ -63,7 +63,7 @@
{{ 'overview.productname' | translate }}
- {{ element.productName }}
+ {{ element.productName }}
|
diff --git a/matsen-tool/src/app/_views/sales/sales.component.ts b/matsen-tool/src/app/_views/sales/sales.component.ts
index ebda07b..9fc6be0 100644
--- a/matsen-tool/src/app/_views/sales/sales.component.ts
+++ b/matsen-tool/src/app/_views/sales/sales.component.ts
@@ -16,7 +16,7 @@ import {ModalStatus} from "@app/_helpers/modal.states";
import {NgbModal, NgbModalOptions} from "@ng-bootstrap/ng-bootstrap";
import {MatTableDataSource} from "@angular/material/table";
import {OrderFilter} from "@app/_models/orderFilter";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {Router} from "@angular/router";
import {registerLocaleData} from "@angular/common";
import localeDe from '@angular/common/locales/de';
@@ -63,7 +63,7 @@ export class SalesComponent implements OnInit {
private translateService: TranslateService,
private modalService: NgbModal,
private router: Router,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
this.sort = new MatSort();
this.displayedColumns = ['pos', 'user', 'partner', 'product', 'turnover', 'profit', 'date', 'details'];
@@ -162,11 +162,11 @@ export class SalesComponent implements OnInit {
navigateToSaleDetails(element: any) {
const sale: SaleJsonld = element as SaleJsonld;
- this.router.navigate(['/sales', this.apiHelperService.extractId(sale.id)]);
+ this.router.navigate(['/sales', this.appHelperService.extractId(sale.id)]);
}
openModalNewSale() {
- const modalRefSale = this.modalService.open(NewSaleComponent, this.modalOptions);
+ const modalRefSale = this.modalService.open(NewSaleComponent, this.appHelperService.getModalOptions());
let sale: SaleJsonld = {} as SaleJsonld;
modalRefSale.componentInstance.sale = sale;
modalRefSale.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
diff --git a/matsen-tool/src/app/_views/tasks/new-task-note/new-task-note.component.ts b/matsen-tool/src/app/_views/tasks/new-task-note/new-task-note.component.ts
index 6315b22..0374152 100644
--- a/matsen-tool/src/app/_views/tasks/new-task-note/new-task-note.component.ts
+++ b/matsen-tool/src/app/_views/tasks/new-task-note/new-task-note.component.ts
@@ -4,7 +4,7 @@ import {ModalStatus} from "@app/_helpers/modal.states";
import {FormGroup} from "@angular/forms";
import {Subscription} from "rxjs";
import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {taskNoteForm} from "@app/_forms/apiForms";
@Component({
@@ -21,7 +21,7 @@ export class NewTaskNoteComponent {
constructor(
private taskNoteService: TaskNoteService,
- protected apiHelperService: ApiHelperService
+ protected appHelperService: AppHelperService
) {
this.taskNoteForm = taskNoteForm;
this.taskNoteSub = new Subscription();
@@ -46,7 +46,7 @@ export class NewTaskNoteComponent {
} else {
// Edit taskNote
this.taskNoteSub = this.taskNoteService.taskNotesIdPatch(
- this.apiHelperService.extractId(this.taskNote.id),
+ this.appHelperService.extractId(this.taskNote.id),
this.taskNoteForm.value as TaskNoteJsonld
).subscribe(
data => {
diff --git a/matsen-tool/src/app/_views/tasks/new-task/new-task.component.ts b/matsen-tool/src/app/_views/tasks/new-task/new-task.component.ts
index ba7e0b9..cd3cfe9 100644
--- a/matsen-tool/src/app/_views/tasks/new-task/new-task.component.ts
+++ b/matsen-tool/src/app/_views/tasks/new-task/new-task.component.ts
@@ -5,7 +5,7 @@ import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer";
import {FormGroup} from "@angular/forms";
import {debounceTime, distinctUntilChanged, Observable, OperatorFunction, Subscription, switchMap} from "rxjs";
import {taskForm} from "@app/_forms/apiForms";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {filter, map} from "rxjs/operators";
@Component({
@@ -27,7 +27,7 @@ export class NewTaskComponent implements OnInit {
private taskService: TaskService,
private userService: UserService,
private partnerService: PartnerService,
- protected apiHelperService: ApiHelperService
+ protected appHelperService: AppHelperService
) {
this.taskForm = taskForm;
this.taskSub = new Subscription();
@@ -97,7 +97,7 @@ export class NewTaskComponent implements OnInit {
} else {
// Edit task
this.taskSub = this.taskService.tasksIdPatch(
- this.apiHelperService.extractId(this.task.id),
+ this.appHelperService.extractId(this.task.id),
this.taskForm.value as TaskJsonld
).subscribe(
data => {
diff --git a/matsen-tool/src/app/_views/tasks/task-list/task-list.component.html b/matsen-tool/src/app/_views/tasks/task-list/task-list.component.html
index bd00f71..787e620 100644
--- a/matsen-tool/src/app/_views/tasks/task-list/task-list.component.html
+++ b/matsen-tool/src/app/_views/tasks/task-list/task-list.component.html
@@ -1,58 +1,55 @@
-
-
-
-
-
- {{ task.dueAt | date:'dd.MM.YYYY':'GMT+0000' }}
-
-
-
{{ task.headline }}
-
-
-
Zugewiesen an: {{ task.assignedToName }}
-
+
+
+
+
+
+
+ {{ task.dueAt | date:'dd.MM.YYYY':'GMT+0000' }}
+
+
+
{{ task.headline }}
+
+
+
Zugewiesen an: {{ task.assignedToName }}
+
+
-
-
-
-
-
-
{{ taskNote.createdAt | date:'dd.MM.YYYY' }}
-
{{ taskNote.ownerName }}
-
-
-
{{ taskNote.message }}
+
+
+
+
+
{{ taskNote.createdAt | date:'dd.MM.YYYY' }}
+
{{ taskNote.ownerName }}
+
+
+
{{ taskNote.message }}
+
+
-
-
-
-
- {{ 'basic.hide-comments' | translate }}
- {{ 'basic.show-comments' | translate }}
-
-
{{ 'basic.comment-it' | translate }}
+
+
+ {{ 'basic.hide-comments' | translate }}
+ {{ 'basic.show-comments' | translate }}
+
+ {{ 'basic.comment-it' | translate }}
+
-
-
0" class="rounded-1"
- [pageSizeOptions]="this.pageSizeOptions"
- [length]="dataLength"
- (page)="handlePageEvent($event)"
- [pageSize]="pageSize"
- [pageIndex]="pageIndex"
- showFirstLastButtons>
-
+
\ No newline at end of file
diff --git a/matsen-tool/src/app/_views/tasks/task-list/task-list.component.ts b/matsen-tool/src/app/_views/tasks/task-list/task-list.component.ts
index 1be83d3..151205c 100644
--- a/matsen-tool/src/app/_views/tasks/task-list/task-list.component.ts
+++ b/matsen-tool/src/app/_views/tasks/task-list/task-list.component.ts
@@ -1,13 +1,12 @@
-import {AfterViewInit, ChangeDetectorRef, Component, Input, OnInit, ViewChild} from '@angular/core';
-import {ListComponent} from "@app/_components/list/list.component";
+import {AfterViewInit, Component, Input, OnInit, ViewChild} from '@angular/core';
+import {PagingComponent} from "@app/_components/paging/paging.component";
import {Subscription} from "rxjs";
import {PartnerJsonld, TaskJsonld, TaskNoteJsonld, TaskService} from "@app/core/api/v1";
-import {MatPaginator, MatPaginatorIntl} from "@angular/material/paginator";
import {MatTableDataSource} from "@angular/material/table";
import {NewTaskComponent} from "@app/_views/tasks/new-task/new-task.component";
import {ModalStatus} from "@app/_helpers/modal.states";
import {NewTaskNoteComponent} from "@app/_views/tasks/new-task-note/new-task-note.component";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";
import {AccountService} from "@app/_services";
import {User} from "@app/_models";
@@ -17,16 +16,15 @@ import {User} from "@app/_models";
templateUrl: './task-list.component.html',
styleUrl: './task-list.component.scss'
})
-export class TaskListComponent extends ListComponent implements OnInit, AfterViewInit {
+export class TaskListComponent {
@Input() public partner!: PartnerJsonld;
-
- @ViewChild(MatPaginator) tasksPaginator: MatPaginator;
+ @ViewChild("pagingComponent", { static: false }) pagingComponent: PagingComponent = new PagingComponent();
protected user: User | null;
protected tasksSub: Subscription;
protected tasks: Array;
- protected tasksDataSource;
+ protected dataSource;
protected taskNotesVisibility: Map;
@@ -34,38 +32,26 @@ export class TaskListComponent extends ListComponent implements OnInit, AfterVie
private taskService: TaskService,
private accountService: AccountService,
private modalService: NgbModal,
- protected apiHelperService: ApiHelperService,
+ protected appHelperService: AppHelperService,
) {
- super();
this.tasksSub = new Subscription();
this.tasks = [];
- this.tasksPaginator = new MatPaginator(new MatPaginatorIntl(), ChangeDetectorRef.prototype);
- this.tasksDataSource = new MatTableDataSource(this.tasks);
- this.tasksPaginator = new MatPaginator(new MatPaginatorIntl(), ChangeDetectorRef.prototype);
+ this.dataSource = new MatTableDataSource(this.tasks);
this.taskNotesVisibility = new Map();
this.user = this.accountService.userValue;
}
- ngOnInit() {
- this.getData();
- }
-
- ngAfterViewInit() {
- this.tasksDataSource.paginator = this.tasksPaginator;
- }
-
- override getData() {
+ getData = () => {
this.tasksSub = this.taskService.tasksGetCollection(
- this.pageIndex + 1,
- this.pageSize,
+ this.pagingComponent.getPageIndex(),
+ this.pagingComponent.getPageSize(),
undefined,
undefined,
this.partner.id
).subscribe(
data => {
this.tasks = data["hydra:member"];
- console.log(this.tasks);
- this.dataLength = Number(data["hydra:totalItems"]);
+ this.pagingComponent.dataLength = Number(data["hydra:totalItems"]);
this.tasks.forEach(task => {
if (task.id) {
this.taskNotesVisibility.set(task.id, false);
@@ -83,7 +69,7 @@ export class TaskListComponent extends ListComponent implements OnInit, AfterVie
}
openModalNewTask() {
- const modalRefTask = this.modalService.open(NewTaskComponent, this.modalOptions);
+ const modalRefTask = this.modalService.open(NewTaskComponent, this.appHelperService.getModalOptions());
let task: TaskJsonld = {} as TaskJsonld;
task.partner = this.partner.id ?? null;
task.completed = false;
@@ -97,7 +83,7 @@ export class TaskListComponent extends ListComponent implements OnInit, AfterVie
}
openModalNewTaskNote(task: TaskJsonld) {
- const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.modalOptions);
+ const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.appHelperService.getModalOptions());
let taskNote: TaskNoteJsonld = {} as TaskNoteJsonld;
taskNote.task = task.id ?? null;
modalRefTaskNote.componentInstance.taskNote = taskNote;
@@ -110,9 +96,9 @@ export class TaskListComponent extends ListComponent implements OnInit, AfterVie
}
openModalEditTask(task: TaskJsonld) {
- const modalRefTaskEdit = this.modalService.open(NewTaskComponent, this.modalOptions);
+ const modalRefTaskEdit = this.modalService.open(NewTaskComponent, this.appHelperService.getModalOptions());
modalRefTaskEdit.componentInstance.task = task;
- modalRefTaskEdit.componentInstance.dueAtValue = this.apiHelperService.convertDate(task.dueAt);
+ modalRefTaskEdit.componentInstance.dueAtValue = this.appHelperService.convertDate(task.dueAt);
modalRefTaskEdit.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRefTaskEdit.dismiss();
@@ -122,7 +108,7 @@ export class TaskListComponent extends ListComponent implements OnInit, AfterVie
}
openModalEditTaskNote(taskNote: TaskNoteJsonld) {
- const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.modalOptions);
+ const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.appHelperService.getModalOptions());
modalRefTaskNote.componentInstance.taskNote = taskNote;
modalRefTaskNote.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
diff --git a/matsen-tool/src/app/_views/tasks/tasks.component.html b/matsen-tool/src/app/_views/tasks/tasks.component.html
index 9bd8c42..adb0f9c 100644
--- a/matsen-tool/src/app/_views/tasks/tasks.component.html
+++ b/matsen-tool/src/app/_views/tasks/tasks.component.html
@@ -7,14 +7,14 @@
-
+
{{ task.dueAt | date:'dd.MM.YYYY':'GMT+0000' }}
{{task.headline}}
-
+
Zugewiesen an: {{task.assignedToName}}
@@ -29,7 +29,7 @@
{{ taskNote.ownerName }}
diff --git a/matsen-tool/src/app/_views/tasks/tasks.component.ts b/matsen-tool/src/app/_views/tasks/tasks.component.ts
index fbb599d..bd3b480 100644
--- a/matsen-tool/src/app/_views/tasks/tasks.component.ts
+++ b/matsen-tool/src/app/_views/tasks/tasks.component.ts
@@ -1,7 +1,7 @@
import {AfterViewInit, ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';
import {NewTaskComponent} from "@app/_views/tasks/new-task/new-task.component";
import {NgbModal, NgbModalOptions} from "@ng-bootstrap/ng-bootstrap";
-import {ApiHelperService} from "@app/_helpers/api-helper.service";
+import {AppHelperService} from "@app/_helpers/app-helper.service";
import {Subscription} from "rxjs";
import {TaskJsonld, TaskNoteJsonld, TaskService} from "@app/core/api/v1";
import {MatPaginator, MatPaginatorIntl, PageEvent} from "@angular/material/paginator";
@@ -39,7 +39,7 @@ export class TasksComponent implements OnInit, AfterViewInit {
private modalService: NgbModal,
private accountService: AccountService,
private taskService: TaskService,
- protected apiHelperService: ApiHelperService
+ protected appHelperService: AppHelperService
) {
this.user = this.accountService.userValue;
@@ -88,7 +88,7 @@ export class TasksComponent implements OnInit, AfterViewInit {
}
openModalNewTask() {
- const modalRefTask = this.modalService.open(NewTaskComponent, this.modalOptions);
+ const modalRefTask = this.modalService.open(NewTaskComponent, this.appHelperService.getModalOptions());
let task: TaskJsonld = {} as TaskJsonld;
task.partner = null;
task.completed = false;
@@ -102,7 +102,7 @@ export class TasksComponent implements OnInit, AfterViewInit {
}
openModalNewTaskNote(task: TaskJsonld) {
- const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.modalOptions);
+ const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.appHelperService.getModalOptions());
let taskNote: TaskNoteJsonld = {} as TaskNoteJsonld;
taskNote.task = task.id ?? null;
modalRefTaskNote.componentInstance.taskNote = taskNote;
@@ -115,9 +115,9 @@ export class TasksComponent implements OnInit, AfterViewInit {
}
openModalEditTask(task: TaskJsonld) {
- const modalRefTaskEdit = this.modalService.open(NewTaskComponent, this.modalOptions);
+ const modalRefTaskEdit = this.modalService.open(NewTaskComponent, this.appHelperService.getModalOptions());
modalRefTaskEdit.componentInstance.task = task;
- modalRefTaskEdit.componentInstance.dueAtValue = this.apiHelperService.convertDate(task.dueAt);
+ modalRefTaskEdit.componentInstance.dueAtValue = this.appHelperService.convertDate(task.dueAt);
modalRefTaskEdit.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRefTaskEdit.dismiss();
@@ -127,7 +127,7 @@ export class TasksComponent implements OnInit, AfterViewInit {
}
openModalEditTaskNote(taskNote: TaskNoteJsonld) {
- const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.modalOptions);
+ const modalRefTaskNote = this.modalService.open(NewTaskNoteComponent, this.appHelperService.getModalOptions());
modalRefTaskNote.componentInstance.taskNote = taskNote;
modalRefTaskNote.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
diff --git a/matsen-tool/src/app/app.module.ts b/matsen-tool/src/app/app.module.ts
index d9cd429..9e1494c 100644
--- a/matsen-tool/src/app/app.module.ts
+++ b/matsen-tool/src/app/app.module.ts
@@ -53,6 +53,7 @@ import {ContactListComponent} from "@app/_views/contacts/contact-list/contact-li
import {ApiModule, Configuration, ConfigurationParameters} from "@app/core/api/v1";
import { TaskListComponent } from './_views/tasks/task-list/task-list.component';
import { SearchInputComponent } from './_components/search-input/search-input.component';
+import { PagingComponent } from '@app/_components/paging/paging.component';
export function apiConfigFactory(): Configuration {
const params: ConfigurationParameters = {
@@ -127,6 +128,7 @@ export function HttpLoaderFactory(http: HttpClient) {
ContactListComponent,
TaskListComponent,
SearchInputComponent,
+ PagingComponent,
],
providers: [
{provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true},