Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Component,
EventEmitter,
OnInit,
inject
} from '@angular/core';
import { TrashInspectionPnSettingsService } from '../../services';
import { Router } from '@angular/router';
Expand All @@ -22,6 +23,12 @@ import {take} from 'rxjs';
standalone: false
})
export class TrashInspectionSettingsComponent implements OnInit {
private trashInspectionPnSettingsService = inject(TrashInspectionPnSettingsService);
private router = inject(Router);
private eFormService = inject(EFormService);
private entitySearchService = inject(EntitySearchService);
private cd = inject(ChangeDetectorRef);

typeahead = new EventEmitter<string>();
settingsModel: TrashInspectionBaseSettingsModel = new TrashInspectionBaseSettingsModel();
templatesModel: TemplateListModel = new TemplateListModel();
Expand All @@ -37,13 +44,9 @@ export class TrashInspectionSettingsComponent implements OnInit {
return ''
}*/

constructor(
private trashInspectionPnSettingsService: TrashInspectionPnSettingsService,
private router: Router,
private eFormService: EFormService,
private entitySearchService: EntitySearchService,
private cd: ChangeDetectorRef
) {


ngOnInit() {
this.typeahead
.pipe(
skip(1),
Expand All @@ -57,9 +60,7 @@ export class TrashInspectionSettingsComponent implements OnInit {
this.templatesModel = items.model;
this.cd.markForCheck();
});
}

ngOnInit() {
this.getSettings();
this.eFormService.getAll(this.templateRequestModel).pipe(take(1))
.subscribe((items) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {AfterContentInit, Component, OnDestroy, OnInit} from '@angular/core';
import {AfterContentInit, Component, OnDestroy, OnInit, inject} from '@angular/core';
import {TranslateService} from '@ngx-translate/core';
import {translates} from './../i18n/translates';
import {AuthStateService} from 'src/app/common/store';
Expand All @@ -15,13 +15,15 @@ import {addPluginToVisited, selectPluginsVisitedPlugins} from 'src/app/state';
})
export class TrashInspectionPnLayoutComponent
implements AfterContentInit, OnInit, OnDestroy {
private translateService = inject(TranslateService);
private store = inject(Store);

currentUserLocaleAsyncSub$: Subscription;
private pluginName = 'trashinspection';
constructor(
private translateService: TranslateService,
store: Store
) {
store.select(selectPluginsVisitedPlugins)


ngOnInit() {
this.store.select(selectPluginsVisitedPlugins)
.pipe(take(1))
.subscribe(x => {
// check current plugin in activated plugin
Expand All @@ -31,14 +33,11 @@ export class TrashInspectionPnLayoutComponent
this.translateService.setTranslation(locale, translates[locale], true);
});
// add plugin to visited plugins
store.dispatch(addPluginToVisited(this.pluginName));
this.store.dispatch(addPluginToVisited(this.pluginName));
}
});
}

ngOnInit() {
}

ngAfterContentInit() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Component,
EventEmitter,
OnInit,
inject
} from '@angular/core';
import { debounceTime, switchMap } from 'rxjs/operators';
import { TrashInspectionPnFractionsService } from '../../../../services';
Expand All @@ -25,6 +26,14 @@ import {Store} from '@ngrx/store';
standalone: false
})
export class FractionCreateComponent implements OnInit {
private authStore = inject(Store);
private trashInspectionPnFractionsService = inject(TrashInspectionPnFractionsService);
private sitesService = inject(SitesService);
private authStateService = inject(AuthStateService);
private eFormService = inject(EFormService);
private cd = inject(ChangeDetectorRef);
public dialogRef = inject(MatDialogRef<FractionCreateComponent>);

onFractionCreated: EventEmitter<void> = new EventEmitter<void>();
newFractionModel: FractionPnModel = new FractionPnModel();
sitesDto: Array<SiteNameDto> = [];
Expand All @@ -35,15 +44,9 @@ export class FractionCreateComponent implements OnInit {
typeahead = new EventEmitter<string>();
private selectCurrentUserClaimsEformsPairingRead$ = this.authStore.select(selectCurrentUserClaimsEformsPairingRead);

constructor(
private authStore: Store,
private trashInspectionPnFractionsService: TrashInspectionPnFractionsService,
private sitesService: SitesService,
private authStateService: AuthStateService,
private eFormService: EFormService,
private cd: ChangeDetectorRef,
public dialogRef: MatDialogRef<FractionCreateComponent>,
) {


ngOnInit() {
this.typeahead
.pipe(
debounceTime(200),
Expand All @@ -58,9 +61,6 @@ export class FractionCreateComponent implements OnInit {
});
this.deployModel = new DeployModel();
this.deployViewModel = new DeployModel();
}

ngOnInit() {
this.loadAllSites();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {
ChangeDetectorRef,
Component,
EventEmitter,
Inject,
OnInit,
inject
} from '@angular/core';
import { TrashInspectionPnFractionsService } from '../../../../services';
import { FractionPnModel } from '../../../../models';
Expand All @@ -23,18 +23,20 @@ import {take} from 'rxjs';
standalone: false
})
export class FractionEditComponent implements OnInit {
private trashInspectionPnFractionsService = inject(TrashInspectionPnFractionsService);
private cd = inject(ChangeDetectorRef);
private eFormService = inject(EFormService);
public dialogRef = inject(MatDialogRef<FractionEditComponent>);
private fractionModel = inject<FractionPnModel>(MAT_DIALOG_DATA);

onFractionUpdated: EventEmitter<void> = new EventEmitter<void>();
selectedFractionModel: FractionPnModel = new FractionPnModel();
templateRequestModel: TemplateRequestModel = new TemplateRequestModel();
templatesModel: TemplateListModel = new TemplateListModel();
typeahead = new EventEmitter<string>();
constructor(
private trashInspectionPnFractionsService: TrashInspectionPnFractionsService,
private cd: ChangeDetectorRef,
private eFormService: EFormService,
public dialogRef: MatDialogRef<FractionEditComponent>,
@Inject(MAT_DIALOG_DATA) fractionModel: FractionPnModel,
) {


ngOnInit() {
this.typeahead
.pipe(
debounceTime(200),
Expand All @@ -48,10 +50,7 @@ export class FractionEditComponent implements OnInit {
this.templatesModel = items.model;
this.cd.markForCheck();
});
this.getSelectedFraction(fractionModel.id);
}

ngOnInit() {
this.getSelectedFraction(this.fractionModel.id);
this.eFormService.getAll(this.templateRequestModel).pipe(take(1)).subscribe((items) => {
this.templatesModel = items.model;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, inject } from '@angular/core';
import { FileUploader } from 'ng2-file-upload';
import { Papa } from 'ngx-papaparse';
import { TrashInspectionPnFractionsService } from '../../../../services';
Expand All @@ -13,6 +13,8 @@ const URL = '';
standalone: false
})
export class FractionsImportComponent implements OnInit {
private fractionsService = inject(TrashInspectionPnFractionsService);

public data: any = [];
uploader: FileUploader;
fractionsImportModel: FractionPnImportModel;
Expand All @@ -38,7 +40,9 @@ export class FractionsImportComponent implements OnInit {
];

columns: MtxGridColumn[] = [];
constructor(private fractionsService: TrashInspectionPnFractionsService) {


ngOnInit() {
this.fractionsImportModel = new FractionPnImportModel();
this.options.forEach((option) => {
this.fractionsImportModel.headerList = [
Expand All @@ -57,9 +61,6 @@ export class FractionsImportComponent implements OnInit {
// console.log(fileItem._file);
this.myFile = fileItem.file.rawFile;
};
}

ngOnInit() {
this.fileName = 'DummyCustomerData.csv';
this.totalColumns = 4;
this.totalRows = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Component, OnDestroy, OnInit, inject} from '@angular/core';
import {FractionPnModel, TransporterPnModel} from '../../../../models';
import {TrashInspectionPnClaims} from '../../../../enums';
import {TrashInspectionPnFractionsService} from '../../../../services';
Expand Down Expand Up @@ -30,6 +30,14 @@ import {
standalone: false
})
export class FractionsPageComponent implements OnInit, OnDestroy {
private store = inject(Store);
public fractionsStateService = inject(FractionsStateService);
public authStateService = inject(AuthStateService);
private translateService = inject(TranslateService);
private dialog = inject(MatDialog);
private overlay = inject(Overlay);
private trashInspectionPnFractionsService = inject(TrashInspectionPnFractionsService);

fractionsModel: Paged<FractionPnModel> = new Paged<FractionPnModel>();
tableHeaders: MtxGridColumn[] = [
{header: this.translateService.stream('Id'), field: 'id', sortProp: {id: 'Id'}, sortable: true},
Expand Down Expand Up @@ -76,16 +84,7 @@ export class FractionsPageComponent implements OnInit, OnDestroy {
public selectFractionsPaginationSort$ = this.store.select(selectFractionsPaginationSort);
public selectFractionsPaginationIsSortDsc$ = this.store.select(selectFractionsPaginationIsSortDsc);

constructor(
private store: Store,
public fractionsStateService: FractionsStateService,
public authStateService: AuthStateService,
private translateService: TranslateService,
private dialog: MatDialog,
private overlay: Overlay,
private trashInspectionPnFractionsService: TrashInspectionPnFractionsService,
) {
}


ngOnInit() {
this.getAllInitialData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
Component,
EventEmitter,
OnInit,
inject
} from '@angular/core';
import {InstallationPnCreateModel, InstallationPnModel} from '../../../../models';
import {TrashInspectionPnInstallationsService} from '../../../../services';
Expand All @@ -20,6 +21,13 @@ import {Store} from '@ngrx/store';
standalone: false
})
export class InstallationCreateComponent implements OnInit {
private authStore = inject(Store);
private trashInspectionPnInstallationsService = inject(TrashInspectionPnInstallationsService);
private sitesService = inject(SitesService);
private authService = inject(AuthService);
public dialogRef = inject(MatDialogRef<InstallationCreateComponent>);
private translateService = inject(TranslateService);

installationCreated: EventEmitter<void> = new EventEmitter<void>();
newInstallationModel: InstallationPnCreateModel = new InstallationPnCreateModel();
sitesDto: Array<SiteNameDto> = [];
Expand All @@ -33,19 +41,11 @@ export class InstallationCreateComponent implements OnInit {
{header: this.translateService.stream('Check to pair'), field: 'deployCheckboxes'},
];

constructor(
private authStore: Store,
private trashInspectionPnInstallationsService: TrashInspectionPnInstallationsService,
private sitesService: SitesService,
private authService: AuthService,
public dialogRef: MatDialogRef<InstallationCreateComponent>,
private translateService: TranslateService,
) {
this.deployViewModel = new DeployModel();
this.fillCheckboxes();
}


ngOnInit() {
this.deployViewModel = new DeployModel();
this.fillCheckboxes();
this.loadAllSites();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
Component,
EventEmitter,
Inject,
OnInit,
inject
} from '@angular/core';
import {
InstallationPnModel,
Expand All @@ -27,6 +27,13 @@ import {Store} from '@ngrx/store';
standalone: false
})
export class InstallationEditComponent implements OnInit {
private authStore = inject(Store);
private trashInspectionPnInstallationsService = inject(TrashInspectionPnInstallationsService);
private sitesService = inject(SitesService);
private translateService = inject(TranslateService);
public dialogRef = inject(MatDialogRef<InstallationEditComponent>);
private installationModel = inject<InstallationPnModel>(MAT_DIALOG_DATA);

onInstallationUpdated: EventEmitter<void> = new EventEmitter<void>();
deployViewModel: DeployModel = new DeployModel();
selectedInstallationModel: InstallationPnModel = new InstallationPnModel();
Expand All @@ -39,18 +46,10 @@ export class InstallationEditComponent implements OnInit {
{header: this.translateService.stream('Related Site'), field: 'deployCheckboxes'},
];

constructor(
private authStore: Store,
private trashInspectionPnInstallationsService: TrashInspectionPnInstallationsService,
private sitesService: SitesService,
private translateService: TranslateService,
public dialogRef: MatDialogRef<InstallationEditComponent>,
@Inject(MAT_DIALOG_DATA) private installationModel: InstallationPnModel
) {
this.loadAllSites();
}


ngOnInit() {
this.loadAllSites();
}

getSelectedInstallation(id: number) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Component, OnDestroy, OnInit, inject} from '@angular/core';
import {
InstallationPnModel,
InstallationsPnModel,
Expand Down Expand Up @@ -31,6 +31,13 @@ import {
standalone: false
})
export class InstallationsPageComponent implements OnInit, OnDestroy {
private store = inject(Store);
public installationsStateService = inject(InstallationsStateService);
private translateService = inject(TranslateService);
private dialog = inject(MatDialog);
private overlay = inject(Overlay);
private trashInspectionPnInstallationsService = inject(TrashInspectionPnInstallationsService);

installationsModel: InstallationsPnModel = new InstallationsPnModel();

tableHeaders: MtxGridColumn[] = [
Expand Down Expand Up @@ -70,15 +77,7 @@ export class InstallationsPageComponent implements OnInit, OnDestroy {
public selectInstallationsPaginationIsSortDsc$ = this.store.select(selectInstallationsPaginationIsSortDsc);
public selectInstallationsPagination$ = this.store.select(selectInstallationsPagination);

constructor(
private store: Store,
public installationsStateService: InstallationsStateService,
private translateService: TranslateService,
private dialog: MatDialog,
private overlay: Overlay,
private trashInspectionPnInstallationsService: TrashInspectionPnInstallationsService
) {
}


ngOnInit() {
this.getAllInitialData();
Expand Down
Loading
Loading