Commit b93ae6af authored by Pearu Sarv's avatar Pearu Sarv
Browse files

Merge remote-tracking branch 'origin/develop' into feature/TEIS-2349

parents 63ea2d9c ce0ad333
<teis-modal [icon]="numberOfInspectedItems ? 'icon-edit' : 'icon-add'" [title]="numberOfInspectedItems ? ('edit_number_of_inspected_items_' + numberOfInspectedItems.item) : ('add_number_of_inspected_items_' + item) | translate">
<teis-modal
[icon]="numberOfInspectedItems ? 'icon-edit' : 'icon-add'"
[title]="numberOfInspectedItems ? 'edit_number_of_inspected_items_' + numberOfInspectedItems.item : ('add_number_of_inspected_items_' + item | translate)"
>
<teis-form-layout [colsize]="18">
<form-row *ngFor="let numbersFormItem of numbersForm.controls | keyvalue:keepOrder" [label]="numbersFormItem.key | translate">
<ska-number min="0" max="999999999" [formControl]="numbersFormItem.value" [name]="numbersFormItem.key" required pattern="\d+"></ska-number>
<form-row *ngFor="let numbersFormItem of numbersForm.controls | keyvalue: keepOrder" [label]="numbersFormItem.key | translate">
<ska-number min="0" max="999999999" [formControl]="numbersFormItem.value" [name]="numbersFormItem.key" required pattern="\d+"></ska-number>
</form-row>
<div *ngIf="numbersForm.errors" class="pb-2">
<teis-alert *ngFor="let error of numbersForm.errors | keyvalue" class="mb-2" variant="danger" [closeable]="false" [message]="error.key | translate"> </teis-alert>
<teis-alert *ngFor="let error of numbersForm.errors | keyvalue" class="mb-2" variant="danger" [closeable]="false" [message]="(error.key | translate) + error.value"> </teis-alert>
</div>
<teis-flex>
......
import { Component, Input, OnInit } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { DriversInspectionsFacade } from '@teis/features/drivers-inspections/drivers-inspections-facade.service';
import { InspectedItem, NumberOfInspectedItemsDto, CreateOrEditNumberOfInspectedItemsDto } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
import { InspectedItem, NumberOfInspectedItemsDto, CreateOrEditNumberOfInspectedItemsDto, DriversInspectionType } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
import { triggerValidation } from '@teis/utils';
import { ModalService } from '@teis/widgets/teis-modal/modal.service';
import { Subject } from 'rxjs';
......@@ -17,6 +17,7 @@ export class AddOrEditNumberOfInspectedItemsComponent implements OnInit {
@Input() numberOfInspectedItems: NumberOfInspectedItemsDto;
@Input() item: InspectedItem;
@Input() inspectionType: DriversInspectionType;
private destroy$ = new Subject<boolean>();
......@@ -29,22 +30,25 @@ export class AddOrEditNumberOfInspectedItemsComponent implements OnInit {
}
private initializeForm() {
this.numbersForm = this.fb.group(
this.numbersForm = this.fb.group(
{
generallyWithoutM: [this.numberOfInspectedItems?.generallyWithoutM ?? 0],
goodsAM: [this.numberOfInspectedItems?.goodsAM ?? 0],
goodsDM: [this.numberOfInspectedItems?.goodsDM ?? 0],
passengersAM: [this.numberOfInspectedItems?.passengersAM ?? 0],
passengersDM: [this.numberOfInspectedItems?.passengersDM ?? 0],
unspecifiedAM: [this.numberOfInspectedItems?.unspecifiedAM ?? 0],
unspecifiedDM: [this.numberOfInspectedItems?.unspecifiedDM ?? 0],
...(this.inspectionType === DriversInspectionType.GOODS
? { goodsAM: [this.numberOfInspectedItems?.goodsAM ?? 0], goodsDM: [this.numberOfInspectedItems?.goodsDM ?? 0], goodsSM: [this.numberOfInspectedItems?.goodsSM ?? 0] }
: {
passengersAM: [this.numberOfInspectedItems?.passengersAM ?? 0],
passengersDM: [this.numberOfInspectedItems?.passengersDM ?? 0],
passengersSM: [this.numberOfInspectedItems?.passengersSM ?? 0],
}),
earningAM: [this.numberOfInspectedItems?.earningAM ?? 0],
earningDM: [this.numberOfInspectedItems?.earningDM ?? 0],
earningSM: [this.numberOfInspectedItems?.earningDM ?? 0],
ownPurposesAM: [this.numberOfInspectedItems?.ownPurposesAM ?? 0],
ownPurposesDM: [this.numberOfInspectedItems?.ownPurposesDM ?? 0],
ownPurposesSM: [this.numberOfInspectedItems?.ownPurposesDM ?? 0],
},
{
validators: [numberOfInspectedItemsSumsValidator],
validators: [numberOfInspectedItemsSumsValidator(this.inspectionType)],
}
);
}
......@@ -53,22 +57,41 @@ export class AddOrEditNumberOfInspectedItemsComponent implements OnInit {
this.modal.close();
}
getNumberOfInspectedItemsDto = (): CreateOrEditNumberOfInspectedItemsDto => {
const formValue = this.numbersForm.value;
const { earningAM, ownPurposesAM, earningDM, ownPurposesDM, earningSM, ownPurposesSM, passengersAM, passengersDM, passengersSM, goodsAM, goodsDM, goodsSM } = formValue;
const generallyAM = earningAM + ownPurposesAM;
const generallyDM = earningDM + ownPurposesDM;
const generallySM = earningSM + ownPurposesSM;
return {
...formValue,
generallyAM,
generallyDM,
generallySM,
goodsAM: goodsAM ?? 0,
goodsDM: goodsDM ?? 0,
goodsSM: goodsSM ?? 0,
passengersAM: passengersAM ?? 0,
passengersDM: passengersDM ?? 0,
passengersSM: passengersSM ?? 0,
unspecifiedAM: 0,
unspecifiedDM: 0,
unspecifiedSM: 0,
item: this.item ? this.item : this.numberOfInspectedItems.item,
};
}
save() {
triggerValidation(this.numbersForm);
this.numbersForm.updateValueAndValidity();
if (this.numbersForm.invalid) {
return;
}
const formValue = this.numbersForm.value;
const { goodsAM, passengersAM, unspecifiedAM } = formValue;
const { goodsDM, passengersDM, unspecifiedDM } = formValue;
const generallyAM = goodsAM + passengersAM + unspecifiedAM;
const generallyDM = goodsDM + passengersDM + unspecifiedDM;
const numberOfInspectedItems: CreateOrEditNumberOfInspectedItemsDto = { ...formValue, generallyAM, generallyDM };
const numberOfInspectedItems: CreateOrEditNumberOfInspectedItemsDto = this.getNumberOfInspectedItemsDto();
if (this.numberOfInspectedItems) {
this.facade.putNumberOfInspectedItems(this.numberOfInspectedItems.id, { ...numberOfInspectedItems, item: this.numberOfInspectedItems.item });
this.facade.putNumberOfInspectedItems(this.numberOfInspectedItems.id, numberOfInspectedItems);
} else {
this.facade.postNumberOfInspectedItems({ item: this.item, ...numberOfInspectedItems });
this.facade.postNumberOfInspectedItems(numberOfInspectedItems);
}
}
......
import { FormGroup, ValidationErrors } from '@angular/forms';
import { DriversInspectionType } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
const isAMSumValid = (group: FormGroup): boolean => {
const { goodsAM, passengersAM, unspecifiedAM, earningAM, ownPurposesAM } = group.controls;
if (goodsAM.dirty && passengersAM.dirty && unspecifiedAM.dirty && earningAM.dirty && ownPurposesAM.dirty) {
if (!amSumsMatch(group)) {
return false;
}
}
return true;
const sumsMatch = (group: FormGroup, type: 'AM' | 'DM' | 'SM'): boolean => {
const goodsValue = group.value[`goods${type}`] ?? 0;
const passengersValue = group.value[`passengers${type}`] ?? 0;
const earningValue = group.value[`earning${type}`];
const ownPurposesValue = group.value[`ownPurposes${type}`];
return goodsValue + passengersValue === earningValue + ownPurposesValue;
};
const amSumsMatch = (group: FormGroup): boolean => {
const { goodsAM, passengersAM, unspecifiedAM, earningAM, ownPurposesAM } = group.value;
return goodsAM + passengersAM + unspecifiedAM === earningAM + ownPurposesAM;
};
const isDMSumValid = (group: FormGroup): boolean => {
const { goodsDM, passengersDM, unspecifiedDM, earningDM, ownPurposesDM } = group.controls;
if (goodsDM.dirty && passengersDM.dirty && unspecifiedDM.dirty && earningDM.dirty && ownPurposesDM.dirty) {
if (!dmSumsMatch(group)) {
const isValidForType = (group: FormGroup, type: 'AM' | 'DM' | 'SM') => {
const goodsControl = group.get(`goods${type}`);
const passengersControl = group.get(`passengers${type}`);
const earningControl = group.get(`earning${type}`);
const ownPurposesControl = group.get(`ownPurposes${type}`);
if ((!goodsControl || goodsControl.dirty) && (!passengersControl || passengersControl.dirty) && earningControl.dirty && ownPurposesControl.dirty) {
if (!sumsMatch(group, type)) {
return false;
}
}
return true;
};
const dmSumsMatch = (group: FormGroup): boolean => {
const { goodsDM, passengersDM, unspecifiedDM, earningDM, ownPurposesDM } = group.value;
return goodsDM + passengersDM + unspecifiedDM === earningDM + ownPurposesDM;
};
export const numberOfInspectedItemsSumsValidator = (group: FormGroup): ValidationErrors | null => {
const invalidSums = [];
if (!isAMSumValid(group)) {
invalidSums.push('AM');
}
if (!isDMSumValid(group)) {
invalidSums.push('DM');
}
if (invalidSums.length) {
return { [`${invalidSums.join('_')}_sum_error`]: true };
}
return null;
export const numberOfInspectedItemsSumsValidator = (inspectionType: DriversInspectionType) => {
return (group: FormGroup): ValidationErrors | null => {
const invalidSums = [];
if (!isValidForType(group, 'AM')) {
invalidSums.push('AM');
}
if (!isValidForType(group, 'DM')) {
invalidSums.push('DM');
}
if (!isValidForType(group, 'SM')) {
invalidSums.push('NM');
}
if (invalidSums.length) {
return { [`sum_error_${inspectionType}`]: `(${invalidSums.join(', ')})` };
}
return null;
};
};
<teis-form-row-details [label]="'controlled_period' | translate">
<span class="font-weight-bold">
{{ itemsDetails.controlledPeriodBeginning | date: 'dd.MM.yyyy' }} - {{ itemsDetails.controlledPeriodEnd | date: 'dd.MM.yyyy' }}
</span>
</teis-form-row-details>
<teis-form-row-details [label]="'number_of_drivers' | translate">
<span class="font-weight-bold">
{{ itemsDetails.numberOfDrivers || '-' }}
</span>
</teis-form-row-details>
<teis-form-row-details [label]="'number_of_vehicles' | translate">
<span class="font-weight-bold">
{{ itemsDetails.numberOfVehicles || '-' }}
</span>
</teis-form-row-details>
<teis-form-row-details [label]="'inspection_type' | translate">
<span class="font-weight-bold">
{{ itemsDetails.inspectionType?.name || '-' }}
</span>
</teis-form-row-details>
<teis-form-row-details [label]="'misdemeanor_ref_number' | translate" class="boldBottom">
<span class="font-weight-bold">
{{ misdemeanorData || '-' }}
</span>
</teis-form-row-details>
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { DriversInspectionInspectedItemsDto } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
@Component({
selector: 'number-of-inspected-items-detail',
templateUrl: './number-of-inspected-items-detail.component.html',
styleUrls: ['./number-of-inspected-items-detail.component.scss']
})
export class NumberOfInspectedItemsDetailComponent implements OnChanges {
@Input() itemsDetails: DriversInspectionInspectedItemsDto;
misdemeanorData: string;
constructor() { }
ngOnChanges(changes: SimpleChanges): void {
if (changes.itemsDetails) {
this.updateMisdemeanorData();
}
}
updateMisdemeanorData(): void {
let data = this.itemsDetails.misdemeanorRefNumber ?? '-';
if (this.itemsDetails.convictedPersonCode) {
data += `, ${this.itemsDetails.convictedPersonCode}, ${this.itemsDetails.convictedPersonName}`;
}
this.misdemeanorData = data;
}
}
......@@ -9,7 +9,7 @@
<tr *ngFor="let item of itemsData">
<td *ngFor="let field of tableFields">{{ item[field] === null ? '-' : item[field] }}</td>
<td class="table-actions fit-width">
<ng-container *permission="{ id: item.id, type: permissionType, permission: managePermission }">
<ng-container *ngIf="itemHasManagePermission(item)">
<teis-icon-button role="button" variant="no-style" icon="icon-edit" (click)="openEditInspectedItemsModal(item)"> </teis-icon-button>
<teis-icon-button role="button" variant="no-style" icon="icon-delete" (click)="delete(item)"></teis-icon-button>
</ng-container>
......
import { Component, Input, OnInit } from '@angular/core';
import { DriversInspectionsFacade } from '@teis/features/drivers-inspections/drivers-inspections-facade.service';
import { NumberOfInspectedItemsDto } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
import { DriversInspectionType, NumberOfInspectedItemsDto } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
import { GenericPermission, PermissionDataObjectType } from '@teis/services/permissions/permissions.model';
import { ConfirmationOptions } from '@teis/widgets/teis-modal/confirmation/confirmation.component';
import { ModalService } from '@teis/widgets/teis-modal/modal.service';
......@@ -16,34 +16,40 @@ import { calculateSums, numberOfInspectedItemsTableFields } from './utils';
export class NumberOfInspectedItemsTableComponent implements OnInit {
@Input() itemsData: NumberOfInspectedItemsDto[] = [];
@Input() inspectionType: DriversInspectionType;
constructor(private modal: ModalService, private facade: DriversInspectionsFacade) { }
readonly managePermission = GenericPermission.MANAGE;
readonly permissionType = PermissionDataObjectType.DRIVERS_NUMBER_OF_INSPECTED_ITEMS;
readonly tableFields = numberOfInspectedItemsTableFields;
tableFields: (keyof NumberOfInspectedItemsDto)[];
fieldSums: Partial<Record<keyof NumberOfInspectedItemsDto, number>> = {};
ngOnInit(): void {
this.tableFields = numberOfInspectedItemsTableFields(this.inspectionType);
if (this.itemsData.length > 1) {
this.fieldSums = calculateSums(this.itemsData);
this.fieldSums = calculateSums(this.itemsData, this.inspectionType);
}
}
openEditInspectedItemsModal(numberOfInspectedItems: NumberOfInspectedItemsDto) {
this.modal.openWithComponent(AddOrEditNumberOfInspectedItemsComponent, { numberOfInspectedItems });
openEditInspectedItemsModal(numberOfInspectedItems: NumberOfInspectedItemsDto): void {
this.modal.openWithComponent(AddOrEditNumberOfInspectedItemsComponent, { numberOfInspectedItems, inspectionType: this.inspectionType });
}
delete(numberOfInspectedItems: NumberOfInspectedItemsDto) {
itemHasManagePermission(numberOfInspectedItems: NumberOfInspectedItemsDto): boolean {
return numberOfInspectedItems.permissions.some(permission => permission.dataObjectPermissions?.includes(this.managePermission));
}
delete(numberOfInspectedItems: NumberOfInspectedItemsDto): void {
const options: ConfirmationOptions = {
title: 'number_of_inspected_items_delete',
question: 'number_of_inspected_items_delete_confirmation',
title: `number_of_inspected_items_delete_${numberOfInspectedItems.item}`,
question: `number_of_inspected_items_delete_confirmation_${numberOfInspectedItems.item}`,
};
this.modal
.confirmDelete(options)
.pipe(take(1))
.subscribe((confirm: boolean) => {
this.modal.close();
if (confirm) this.facade.deleteNumberOfInspectedItems(numberOfInspectedItems.id);
});;
if (confirm) this.facade.deleteNumberOfInspectedItems(numberOfInspectedItems);
});
}
}
import { NumberOfInspectedItemsDto } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
import { DriversInspectionType, NumberOfInspectedItemsDto } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
export const numberOfInspectedItemsTableFields: (keyof NumberOfInspectedItemsDto)[] = [
export const numberOfInspectedItemsTableFields = (inspectionType: DriversInspectionType): (keyof NumberOfInspectedItemsDto)[] => [
'generallyAM',
'generallyDM',
'generallySM',
'generallyWithoutM',
'goodsAM',
'goodsDM',
'passengersAM',
'passengersDM',
'unspecifiedAM',
'unspecifiedDM',
...((inspectionType === DriversInspectionType.GOODS ? ['goodsAM', 'goodsDM', 'goodsSM'] : ['passengersAM', 'passengersDM', 'passengersSM']) as (keyof NumberOfInspectedItemsDto)[]),
'earningAM',
'earningDM',
'earningSM',
'ownPurposesAM',
'ownPurposesDM',
'ownPurposesSM',
];
export const calculateSums = (items: NumberOfInspectedItemsDto[]): Partial<Record<keyof NumberOfInspectedItemsDto, number>> => {
export const calculateSums = (items: NumberOfInspectedItemsDto[], inspectionType: DriversInspectionType): Partial<Record<keyof NumberOfInspectedItemsDto, number>> => {
return items.reduce((previousSums, item) => {
const sums = {};
for (const field of numberOfInspectedItemsTableFields) {
for (const field of numberOfInspectedItemsTableFields(inspectionType)) {
sums[field] = (item[field] ?? 0) + (previousSums[field] ?? 0);
}
return sums;
}, {});
};
export const calculateTotalSum = (items: NumberOfInspectedItemsDto[]): number | null => {
return !items?.length
? null
: items.reduce((totalSum, item) => {
return totalSum + item.generallyAM + item.generallyDM + item.generallySM;
}, 0);
};
......@@ -4,29 +4,41 @@
<teis-header variant="block" [title]="'inspected_numbers' | translate"> </teis-header>
</div>
<number-of-inspected-items-detail [itemsDetails]="inspectionInspectedItems$ | async"></number-of-inspected-items-detail>
<p class="font-weight-bold">{{ 'inspected_drivers' | translate }}</p>
<teis-number-of-inspected-items-table
*ngIf="(numberOfDriversItems$ | async)?.length; else inspectedDriversNotFound"
[inspectionType]="inspectionType$ | async"
[itemsData]="numberOfDriversItems$ | async"
></teis-number-of-inspected-items-table>
<ng-template #inspectedDriversNotFound>
<teis-alert variant="info" [closeable]="false" [message]="'inspected_drivers_not_found' | translate" class="mb-2"></teis-alert>
</ng-template>
<button *permission="{ id: inspectionId$ | async, type: permissionType, permission: addItemPermission }" teis-button variant="plain" class="p-0 mb-4" (click)="openAddInspectedItemsModal('DRIVERS')">
<teis-icon icon="icon-add-round"></teis-icon>
{{ 'add' | translate }}
</button>
<p class="font-weight-bold">{{ 'inspected_work_days' | translate }}</p>
<teis-flex position="spaceBetween">
<button *permission="{ id: inspectionId$ | async, type: permissionType, permission: addItemPermission }" teis-button variant="plain" class="p-0" (click)="openAddInspectedItemsModal('DRIVERS')">
<teis-icon icon="icon-add-round"></teis-icon>
{{ 'add' | translate }}
</button>
<p *ngIf="(totalSumOfDriversItems$ | async) !== null" class="ml-auto font-weight-bold">{{'sum' | translate}} {{totalSumOfDriversItems$ | async}}</p>
</teis-flex>
<p class="font-weight-bold mt-4">{{ 'inspected_work_days' | translate }}</p>
<teis-number-of-inspected-items-table
*ngIf="(numberOfWorkDaysItems$ | async)?.length; else inspectedWorkDaysNotFound"
[inspectionType]="inspectionType$ | async"
[itemsData]="numberOfWorkDaysItems$ | async"
></teis-number-of-inspected-items-table>
<ng-template #inspectedWorkDaysNotFound>
<teis-alert variant="info" [closeable]="false" [message]="'inspected_work_days_not_found' | translate" class="mb-2"></teis-alert>
</ng-template>
</ng-template>
<button *permission="{ id: inspectionId$ | async, type: permissionType, permission: addItemPermission }" teis-button variant="plain" class="p-0" (click)="openAddInspectedItemsModal('WORKINGDAYS')">
<teis-icon icon="icon-add-round"></teis-icon>
{{ 'add' | translate }}
</button>
<teis-flex position="spaceBetween">
<button *permission="{ id: inspectionId$ | async, type: permissionType, permission: addItemPermission }" teis-button variant="plain" class="p-0" (click)="openAddInspectedItemsModal('WORKINGDAYS')">
<teis-icon icon="icon-add-round"></teis-icon>
{{ 'add' | translate }}
</button>
<p *ngIf="(totalSumOfWorkDaysItems$ | async) !== null" class="ml-auto font-weight-bold">{{'sum' | translate}} {{totalSumOfWorkDaysItems$ | async}}</p>
</teis-flex>
import { Component, OnInit } from '@angular/core';
import { DriversInspectionsFacade } from '@teis/features/drivers-inspections/drivers-inspections-facade.service';
import { DriversInspectionPermission, InspectedItem } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
import { DriversInspectionPermission, DriversInspectionType, InspectedItem } from '@teis/features/drivers-inspections/services/drivers-inspections.model';
import { PermissionDataObjectType } from '@teis/services/permissions/permissions.model';
import { ModalService } from '@teis/widgets/teis-modal/modal.service';
import { shareReplay } from 'rxjs/operators';
import { map, shareReplay, take } from 'rxjs/operators';
import { AddOrEditNumberOfInspectedItemsComponent } from '../add-or-edit-number-of-inspected-items/add-or-edit-number-of-inspected-items.component';
import { calculateTotalSum } from '../number-of-inspected-items-table/utils';
@Component({
selector: 'teis-number-of-inspected-items',
......@@ -16,7 +17,11 @@ export class NumberOfInspectedItemsComponent implements OnInit {
constructor(public facade: DriversInspectionsFacade, private modal: ModalService) { }
numberOfDriversItems$ = this.facade.numberOfDriversItems.pipe(shareReplay({ refCount: true }));
totalSumOfDriversItems$ = this.facade.numberOfDriversItems.pipe(map(calculateTotalSum), shareReplay({ refCount: true }));
numberOfWorkDaysItems$ = this.facade.numberOfWorkingDaysItems.pipe(shareReplay({ refCount: true }));
totalSumOfWorkDaysItems$ = this.facade.numberOfWorkingDaysItems.pipe(map(calculateTotalSum), shareReplay({ refCount: true }));
inspectionType$ = this.facade.driversInspectionInspectedItems.pipe(map(items => items.inspectionType?.code), shareReplay({ refCount: true }));
inspectionInspectedItems$ = this.facade.driversInspectionInspectedItems;
inspectionId$ = this.facade.driversInspectionId;
readonly addItemPermission = DriversInspectionPermission.ADD_DRIVERS_NUMBER_OF_INSPECTED_ITEM;
......@@ -27,7 +32,9 @@ export class NumberOfInspectedItemsComponent implements OnInit {
}
openAddInspectedItemsModal(item: InspectedItem) {
this.modal.openWithComponent(AddOrEditNumberOfInspectedItemsComponent, { item });
this.inspectionType$.pipe(take(1)).subscribe((inspectionType) => {
this.modal.openWithComponent(AddOrEditNumberOfInspectedItemsComponent, { item, inspectionType });
});
}
}
......@@ -7,6 +7,7 @@ import { NumberOfInspectedItemsComponent } from './containers/number-of-inspecte
import { NumberOfInspectedItemsTableComponent } from './containers/number-of-inspected-items-table/number-of-inspected-items-table.component';
import { AddFileComponent } from './containers/add-file/add-file.component';
import { AddOrEditNumberOfInspectedItemsComponent } from './containers/add-or-edit-number-of-inspected-items/add-or-edit-number-of-inspected-items.component';
import { NumberOfInspectedItemsDetailComponent } from './containers/number-of-inspected-items-detail/number-of-inspected-items-detail.component';
@NgModule({
declarations: [
......@@ -16,6 +17,7 @@ import { AddOrEditNumberOfInspectedItemsComponent } from './containers/add-or-ed
NumberOfInspectedItemsTableComponent,
AddFileComponent,
AddOrEditNumberOfInspectedItemsComponent,
NumberOfInspectedItemsDetailComponent,
],
exports: [],
imports: [DriversInspectionsRoutingModule, DriversInspectionsSharedModule],
......
......@@ -1101,17 +1101,22 @@
"inspected_work_days": "Kontrollitud tööpäevade arv EN",
"generallyAM": "Kokku AM EN",
"generallyDM": "Kokku DM EN",
"generallySM": "Kokku NM EN",
"generallyWithoutM": "Kokku meerikuta EN",
"goodsAM": "Veose veol AM EN",
"goodsDM": "Veose veol DM EN",
"goodsSM": "Veose veol NM EN",
"passengersAM": "Sõitjate veol AM EN",
"passengersDM": "Sõitjate veol DM EN",
"passengersSM": "Sõitjate veol NM EN",
"unspecifiedAM": "Määramata sisuga veol AM EN",
"unspecifiedDM": "Määramata sisuga veol DM EN",
"earningAM": "Tasulisel veol AM EN",
"earningDM": "Tasulisel veol DM EN",
"earningSM": "Tasulisel veol NM EN",
"ownPurposesAM": "Oma tarbeks veol AM EN",
"ownPurposesDM": "Oma tarbeks veol DM EN",
"ownPurposesSM": "Oma tarbeks veol NM EN",
"inspected_drivers_not_found": "Kontrollitud juhtide arvud puuduvad EN",
"inspected_work_days_not_found": "Kontrollitud tööpäevade arvud puuduvad EN",
"processing_report": "Töötlemise aruanne EN",
......@@ -1148,13 +1153,12 @@
"add_justification_file_success": "Kõrvalekalde põhjenduse fail edukalt lisatud EN",
"justification_file_delete_success": "Kõrvalekalde põhjenduse fail edukalt kustutatud EN",
"add": "Lisa EN",
"AM_sum_error": "Veose ja sõitjate veo arvude summa peab võrduma tasulise veo ja oma tarbeks veo arvude summaga (AM) EN",
"DM_sum_error": "Veose ja sõitjate veo arvude summa peab võrduma tasulise veo ja oma tarbeks veo arvude summaga (DM) EN",
"AM_DM_sum_error": "Veose ja sõitjate veo arvude summa peab võrduma tasulise veo ja oma tarbeks veo arvude summaga (AM, DM) EN",