awf-test-lib 0.1.24 → 0.1.25
Sign up to get free protection for your applications and to get access to all the features.
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +10 -24
- package/src/lib/core/core-routing.module.ts +10 -0
- package/src/lib/core/core.module.ts +35 -0
- package/src/lib/core/menu/menu.component.css +18 -0
- package/src/lib/core/menu/menu.component.html +8 -0
- package/src/lib/core/menu/menu.component.spec.ts +23 -0
- package/src/lib/core/menu/menu.component.ts +28 -0
- package/src/lib/core/menu-consomer/menu-consomer.component.html +20 -0
- package/src/lib/core/menu-consomer/menu-consomer.component.scss +20 -0
- package/src/lib/core/menu-consomer/menu-consomer.component.spec.ts +25 -0
- package/src/lib/core/menu-consomer/menu-consomer.component.ts +21 -0
- package/src/lib/core/menu-ge-portal/menu-ge-portal.component.html +7 -0
- package/src/lib/core/menu-ge-portal/menu-ge-portal.component.scss +17 -0
- package/src/lib/core/menu-ge-portal/menu-ge-portal.component.spec.ts +25 -0
- package/src/lib/core/menu-ge-portal/menu-ge-portal.component.ts +83 -0
- package/src/lib/core/menu-warranty/menu-warranty.component.html +20 -0
- package/src/lib/core/menu-warranty/menu-warranty.component.scss +16 -0
- package/src/lib/core/menu-warranty/menu-warranty.component.spec.ts +25 -0
- package/src/lib/core/menu-warranty/menu-warranty.component.ts +31 -0
- package/src/lib/core/not-found/not-found.component.css +31 -0
- package/src/lib/core/not-found/not-found.component.html +6 -0
- package/src/lib/core/not-found/not-found.component.spec.ts +23 -0
- package/src/lib/core/not-found/not-found.component.ts +15 -0
- package/src/lib/core/top-bar/top-bar.component.css +116 -0
- package/src/lib/core/top-bar/top-bar.component.html +1 -0
- package/src/lib/core/top-bar/top-bar.component.spec.ts +23 -0
- package/src/lib/core/top-bar/top-bar.component.ts +39 -0
- package/{lib/models/account.model.d.ts → src/lib/models/account.model.ts} +17 -14
- package/src/lib/models/alternativeDate.model.ts +6 -0
- package/src/lib/models/applicationName.ts +6 -0
- package/{lib/models/cancelPMMailRequest.model.d.ts → src/lib/models/cancelPMMailRequest.model.ts} +7 -5
- package/src/lib/models/customObject.model.ts +4 -0
- package/src/lib/models/detailedPmJob.model.ts +25 -0
- package/src/lib/models/emailStatus.ts +4 -0
- package/src/lib/models/emailType.ts +19 -0
- package/src/lib/models/eventStatus.ts +8 -0
- package/src/lib/models/field.ts +7 -0
- package/src/lib/models/language.ts +4 -0
- package/{lib/models/mailRequest.model.d.ts → src/lib/models/mailRequest.model.ts} +18 -16
- package/src/lib/models/pMGroupedJob.model.ts +4 -0
- package/{lib/models/pmJob.model.d.ts → src/lib/models/pmJob.model.ts} +26 -25
- package/src/lib/models/pmJobRequest.model.ts +6 -0
- package/{lib/models/pmJobStatus.d.ts → src/lib/models/pmJobStatus.ts} +19 -14
- package/src/lib/models/reason.model.ts +7 -0
- package/src/lib/models/reasonCode.ts +9 -0
- package/src/lib/models/reasonContact.ts +7 -0
- package/{lib/models/reportDateMailRequest.model.d.ts → src/lib/models/reportDateMailRequest.model.ts} +7 -5
- package/src/lib/models/role.ts +5 -0
- package/src/lib/models/service.model.ts +8 -0
- package/src/lib/models/serviceName.ts +14 -0
- package/{lib/models/socialLoginRequest.model.d.ts → src/lib/models/socialLoginRequest.model.ts} +6 -6
- package/src/lib/models/socialMadia.ts +4 -0
- package/src/lib/models/stingBoolean.ts +7 -0
- package/src/lib/models/system.ts +15 -0
- package/{lib/models/theme.model.d.ts → src/lib/models/theme.model.ts} +45 -38
- package/src/lib/models/tokenStatus.ts +6 -0
- package/src/lib/models/warranty.ts +18 -0
- package/src/lib/pipes/pipes/pipes.module.ts +14 -0
- package/src/lib/pipes/subrtring-w.pipe.spec.ts +8 -0
- package/src/lib/pipes/subrtring-w.pipe.ts +16 -0
- package/src/lib/pipes/substring.pipe.spec.ts +8 -0
- package/src/lib/pipes/substring.pipe.ts +15 -0
- package/src/lib/shared/choose-another-date/choose-another-date.component.html +12 -0
- package/src/lib/shared/choose-another-date/choose-another-date.component.scss +12 -0
- package/src/lib/shared/choose-another-date/choose-another-date.component.spec.ts +25 -0
- package/src/lib/shared/choose-another-date/choose-another-date.component.ts +127 -0
- package/src/lib/shared/confirm-dialog/confirm-dialog.component.html +26 -0
- package/src/lib/shared/confirm-dialog/confirm-dialog.component.scss +0 -0
- package/src/lib/shared/confirm-dialog/confirm-dialog.component.spec.ts +25 -0
- package/src/lib/shared/confirm-dialog/confirm-dialog.component.ts +39 -0
- package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.css +0 -0
- package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.html +19 -0
- package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.spec.ts +23 -0
- package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.ts +36 -0
- package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.html +25 -0
- package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.scss +23 -0
- package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.spec.ts +25 -0
- package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.ts +30 -0
- package/src/lib/shared/contact/contact.component.css +144 -0
- package/src/lib/shared/contact/contact.component.html +136 -0
- package/src/lib/shared/contact/contact.component.spec.ts +23 -0
- package/src/lib/shared/contact/contact.component.ts +169 -0
- package/src/lib/shared/contact-support/contact-support.component.html +130 -0
- package/src/lib/shared/contact-support/contact-support.component.scss +10 -0
- package/src/lib/shared/contact-support/contact-support.component.spec.ts +25 -0
- package/src/lib/shared/contact-support/contact-support.component.ts +188 -0
- package/src/lib/shared/dashboard/dashboard.component.html +81 -0
- package/src/lib/shared/dashboard/dashboard.component.scss +5 -0
- package/src/lib/shared/dashboard/dashboard.component.spec.ts +23 -0
- package/src/lib/shared/dashboard/dashboard.component.ts +23 -0
- package/src/lib/shared/maintenance-list/maintenance-list.component.html +105 -0
- package/src/lib/shared/maintenance-list/maintenance-list.component.scss +26 -0
- package/src/lib/shared/maintenance-list/maintenance-list.component.spec.ts +25 -0
- package/src/lib/shared/maintenance-list/maintenance-list.component.ts +403 -0
- package/src/lib/shared/shared-routing.module.ts +10 -0
- package/src/lib/shared/shared.module.ts +80 -0
- package/src/lib/shared/show-links/show-links.component.html +49 -0
- package/src/lib/shared/show-links/show-links.component.scss +0 -0
- package/src/lib/shared/show-links/show-links.component.spec.ts +25 -0
- package/src/lib/shared/show-links/show-links.component.ts +78 -0
- package/src/lib/shared/system-list/system-list.component.css +0 -0
- package/src/lib/shared/system-list/system-list.component.html +40 -0
- package/src/lib/shared/system-list/system-list.component.spec.ts +23 -0
- package/src/lib/shared/system-list/system-list.component.ts +26 -0
- package/{public-api.d.ts → src/public-api.ts} +57 -42
- package/src/test.ts +27 -0
- package/tsconfig.lib.dev.json +10 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.pp.json +10 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2022/awf-test-lib.mjs +0 -5
- package/esm2022/lib/core/core-routing.module.mjs +0 -18
- package/esm2022/lib/core/core.module.mjs +0 -51
- package/esm2022/lib/core/menu/menu.component.mjs +0 -44
- package/esm2022/lib/core/menu-consomer/menu-consomer.component.mjs +0 -28
- package/esm2022/lib/core/menu-ge-portal/menu-ge-portal.component.mjs +0 -108
- package/esm2022/lib/core/menu-warranty/menu-warranty.component.mjs +0 -37
- package/esm2022/lib/core/not-found/not-found.component.mjs +0 -21
- package/esm2022/lib/core/top-bar/top-bar.component.mjs +0 -43
- package/esm2022/lib/models/account.model.mjs +0 -15
- package/esm2022/lib/models/alternativeDate.model.mjs +0 -7
- package/esm2022/lib/models/applicationName.mjs +0 -7
- package/esm2022/lib/models/cancelPMMailRequest.model.mjs +0 -6
- package/esm2022/lib/models/customObject.model.mjs +0 -4
- package/esm2022/lib/models/detailedPmJob.model.mjs +0 -23
- package/esm2022/lib/models/emailStatus.mjs +0 -6
- package/esm2022/lib/models/emailType.mjs +0 -17
- package/esm2022/lib/models/eventStatus.mjs +0 -9
- package/esm2022/lib/models/field.mjs +0 -9
- package/esm2022/lib/models/language.mjs +0 -6
- package/esm2022/lib/models/mailRequest.model.mjs +0 -17
- package/esm2022/lib/models/pMGroupedJob.model.mjs +0 -4
- package/esm2022/lib/models/pmJob.model.mjs +0 -23
- package/esm2022/lib/models/pmJobRequest.model.mjs +0 -5
- package/esm2022/lib/models/pmJobStatus.mjs +0 -17
- package/esm2022/lib/models/reason.model.mjs +0 -5
- package/esm2022/lib/models/reasonCode.mjs +0 -9
- package/esm2022/lib/models/reasonContact.mjs +0 -8
- package/esm2022/lib/models/reportDateMailRequest.model.mjs +0 -6
- package/esm2022/lib/models/role.mjs +0 -7
- package/esm2022/lib/models/service.model.mjs +0 -9
- package/esm2022/lib/models/serviceName.mjs +0 -12
- package/esm2022/lib/models/socialLoginRequest.model.mjs +0 -7
- package/esm2022/lib/models/socialMadia.mjs +0 -5
- package/esm2022/lib/models/stingBoolean.mjs +0 -6
- package/esm2022/lib/models/system.mjs +0 -14
- package/esm2022/lib/models/theme.model.mjs +0 -2
- package/esm2022/lib/models/tokenStatus.mjs +0 -7
- package/esm2022/lib/models/warranty.mjs +0 -18
- package/esm2022/lib/pipes/pipes/pipes.module.mjs +0 -21
- package/esm2022/lib/pipes/subrtring-w.pipe.mjs +0 -20
- package/esm2022/lib/pipes/substring.pipe.mjs +0 -16
- package/esm2022/lib/shared/choose-another-date/choose-another-date.component.mjs +0 -117
- package/esm2022/lib/shared/confirm-dialog/confirm-dialog.component.mjs +0 -52
- package/esm2022/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.mjs +0 -48
- package/esm2022/lib/shared/confirmed-date-information/confirmed-date-information.component.mjs +0 -44
- package/esm2022/lib/shared/contact/contact.component.mjs +0 -170
- package/esm2022/lib/shared/contact-support/contact-support.component.mjs +0 -186
- package/esm2022/lib/shared/dashboard/dashboard.component.mjs +0 -39
- package/esm2022/lib/shared/maintenance-list/maintenance-list.component.mjs +0 -372
- package/esm2022/lib/shared/shared-routing.module.mjs +0 -18
- package/esm2022/lib/shared/shared.module.mjs +0 -144
- package/esm2022/lib/shared/show-links/show-links.component.mjs +0 -86
- package/esm2022/lib/shared/system-list/system-list.component.mjs +0 -35
- package/esm2022/public-api.mjs +0 -48
- package/fesm2022/awf-test-lib.mjs +0 -1860
- package/fesm2022/awf-test-lib.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/core/core-routing.module.d.ts +0 -7
- package/lib/core/core.module.d.ts +0 -15
- package/lib/core/menu/menu.component.d.ts +0 -17
- package/lib/core/menu-consomer/menu-consomer.component.d.ts +0 -12
- package/lib/core/menu-ge-portal/menu-ge-portal.component.d.ts +0 -20
- package/lib/core/menu-warranty/menu-warranty.component.d.ts +0 -15
- package/lib/core/not-found/not-found.component.d.ts +0 -10
- package/lib/core/top-bar/top-bar.component.d.ts +0 -13
- package/lib/models/alternativeDate.model.d.ts +0 -6
- package/lib/models/applicationName.d.ts +0 -5
- package/lib/models/customObject.model.d.ts +0 -3
- package/lib/models/detailedPmJob.model.d.ts +0 -23
- package/lib/models/emailStatus.d.ts +0 -4
- package/lib/models/emailType.d.ts +0 -15
- package/lib/models/eventStatus.d.ts +0 -7
- package/lib/models/field.d.ts +0 -7
- package/lib/models/language.d.ts +0 -4
- package/lib/models/pMGroupedJob.model.d.ts +0 -3
- package/lib/models/pmJobRequest.model.d.ts +0 -5
- package/lib/models/reason.model.d.ts +0 -4
- package/lib/models/reasonCode.d.ts +0 -7
- package/lib/models/reasonContact.d.ts +0 -6
- package/lib/models/role.d.ts +0 -5
- package/lib/models/service.model.d.ts +0 -8
- package/lib/models/serviceName.d.ts +0 -10
- package/lib/models/socialMadia.d.ts +0 -3
- package/lib/models/stingBoolean.d.ts +0 -4
- package/lib/models/system.d.ts +0 -14
- package/lib/models/tokenStatus.d.ts +0 -5
- package/lib/models/warranty.d.ts +0 -17
- package/lib/pipes/pipes/pipes.module.d.ts +0 -9
- package/lib/pipes/subrtring-w.pipe.d.ts +0 -7
- package/lib/pipes/substring.pipe.d.ts +0 -7
- package/lib/shared/choose-another-date/choose-another-date.component.d.ts +0 -33
- package/lib/shared/confirm-dialog/confirm-dialog.component.d.ts +0 -21
- package/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.d.ts +0 -19
- package/lib/shared/confirmed-date-information/confirmed-date-information.component.d.ts +0 -17
- package/lib/shared/contact/contact.component.d.ts +0 -39
- package/lib/shared/contact-support/contact-support.component.d.ts +0 -50
- package/lib/shared/dashboard/dashboard.component.d.ts +0 -18
- package/lib/shared/maintenance-list/maintenance-list.component.d.ts +0 -81
- package/lib/shared/shared-routing.module.d.ts +0 -7
- package/lib/shared/shared.module.d.ts +0 -40
- package/lib/shared/show-links/show-links.component.d.ts +0 -24
- package/lib/shared/system-list/system-list.component.d.ts +0 -16
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
export class Warranty {
|
3
|
+
manufacturerId!: number;
|
4
|
+
contractId!: number;
|
5
|
+
contractProductId?: number;
|
6
|
+
contractProductParentId?: number;
|
7
|
+
contractCode!: string;
|
8
|
+
saleDate?: Date;
|
9
|
+
brand!: string;
|
10
|
+
family!: string;
|
11
|
+
commercialReference!: string;
|
12
|
+
technicalReference!: string;
|
13
|
+
productDescription!: string;
|
14
|
+
startDate?: Date;
|
15
|
+
endDate?: Date;
|
16
|
+
PdfLink?:string;
|
17
|
+
consId?:number;
|
18
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { NgModule } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { SubstringPipe } from '../substring.pipe';
|
4
|
+
import { SubrtringWPipe } from '../subrtring-w.pipe';
|
5
|
+
|
6
|
+
|
7
|
+
@NgModule({
|
8
|
+
declarations: [SubstringPipe,SubrtringWPipe],
|
9
|
+
exports: [SubstringPipe,SubrtringWPipe],
|
10
|
+
imports: [
|
11
|
+
CommonModule
|
12
|
+
]
|
13
|
+
})
|
14
|
+
export class PipesModule { }
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
2
|
+
|
3
|
+
@Pipe({
|
4
|
+
name: 'subrtringW'
|
5
|
+
})
|
6
|
+
export class SubrtringWPipe implements PipeTransform {
|
7
|
+
|
8
|
+
transform(brand: string, manufacturerId: number): string {
|
9
|
+
if(manufacturerId==4 && (brand.substring(0, 2)==='FR') )
|
10
|
+
{
|
11
|
+
return brand.substring(2, 12);
|
12
|
+
}
|
13
|
+
else
|
14
|
+
return brand
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
3
|
+
|
4
|
+
|
5
|
+
@Pipe({
|
6
|
+
name: 'substring'
|
7
|
+
})
|
8
|
+
export class SubstringPipe implements PipeTransform {
|
9
|
+
|
10
|
+
transform(time: string, arg1: number, arg2: number): string {
|
11
|
+
return time.substring(arg1, arg2);
|
12
|
+
}
|
13
|
+
|
14
|
+
}
|
15
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<p-toast position="top-center"></p-toast>
|
2
|
+
<div>
|
3
|
+
<p-dialog [header]="translate.text" [(visible)]="displayAnotherDate" [modal]="true" [style]="{width: '2000px',height:'600px'}" [draggable]="false" [resizable]="false" (onHide)="close()">
|
4
|
+
<p-calendar #calendar [(ngModel)]="dates" selectionMode="multiple" [numberOfMonths]="2" [touchUI]="true" [inline]="true" inputId="multiplemonths" (click)="onSelect()"></p-calendar>
|
5
|
+
<ng-template pTemplate="footer">
|
6
|
+
<div class="popup-footer">
|
7
|
+
<p class="popup-footer-message">{{translate.message}}</p>
|
8
|
+
<p-button icon="pi pi-calendar-plus" (click)="askDate()" [label]="translate.ask" class="p-button-text"></p-button>
|
9
|
+
</div>
|
10
|
+
</ng-template>
|
11
|
+
</p-dialog>
|
12
|
+
</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
+
|
3
|
+
import { ChooseAnotherDateComponent } from './choose-another-date.component';
|
4
|
+
|
5
|
+
describe('ChooseAnotherDateComponent', () => {
|
6
|
+
let component: ChooseAnotherDateComponent;
|
7
|
+
let fixture: ComponentFixture<ChooseAnotherDateComponent>;
|
8
|
+
|
9
|
+
beforeEach(async () => {
|
10
|
+
await TestBed.configureTestingModule({
|
11
|
+
declarations: [ ChooseAnotherDateComponent ]
|
12
|
+
})
|
13
|
+
.compileComponents();
|
14
|
+
});
|
15
|
+
|
16
|
+
beforeEach(() => {
|
17
|
+
fixture = TestBed.createComponent(ChooseAnotherDateComponent);
|
18
|
+
component = fixture.componentInstance;
|
19
|
+
fixture.detectChanges();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('should create', () => {
|
23
|
+
expect(component).toBeTruthy();
|
24
|
+
});
|
25
|
+
});
|
@@ -0,0 +1,127 @@
|
|
1
|
+
import { Component, EventEmitter, Input,OnChanges,OnInit,Output, ViewChild, ViewEncapsulation } from '@angular/core';
|
2
|
+
import { MessageService } from 'primeng/api';
|
3
|
+
import { Calendar } from 'primeng/calendar';
|
4
|
+
import { AlternativeDate } from '../../models/alternativeDate.model';
|
5
|
+
import { PrimeNGConfig } from 'primeng/api';
|
6
|
+
@Component({
|
7
|
+
selector: 'app-choose-another-date',
|
8
|
+
templateUrl: './choose-another-date.component.html',
|
9
|
+
styleUrls: ['./choose-another-date.component.scss'],
|
10
|
+
encapsulation: ViewEncapsulation.None,
|
11
|
+
})
|
12
|
+
export class ChooseAnotherDateComponent implements OnChanges, OnInit {
|
13
|
+
@Input() displayAnotherDate!: boolean;
|
14
|
+
@Input() globaltranslate!: any;
|
15
|
+
@Input() translate!: any;
|
16
|
+
@Input() alternativeDatesList!: AlternativeDate[];
|
17
|
+
@Output() closeAnotherDate = new EventEmitter<boolean>();
|
18
|
+
@Output() acceptDate = new EventEmitter<AlternativeDate[]>();
|
19
|
+
@ViewChild('calendar') calendar!: Calendar;
|
20
|
+
|
21
|
+
dates: Date[]= [];
|
22
|
+
datesRef: Date[]= [];
|
23
|
+
selectedDate !: any;
|
24
|
+
show=false;
|
25
|
+
dateslength = 0 ;
|
26
|
+
indexSelectedDate = 0;
|
27
|
+
constructor(private messageService :MessageService) {}
|
28
|
+
|
29
|
+
ngOnInit(): void {
|
30
|
+
this.loadDates() ;
|
31
|
+
}
|
32
|
+
|
33
|
+
ngOnChanges(): void {}
|
34
|
+
|
35
|
+
close()
|
36
|
+
{
|
37
|
+
this.closeAnotherDate.emit(true);
|
38
|
+
this.messageService.add({ severity: 'error', summary: this.globaltranslate.summaryReject, detail: this.globaltranslate.detailReject });
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
accept()
|
43
|
+
{
|
44
|
+
this.controlAlternativeDates();
|
45
|
+
|
46
|
+
this.acceptDate.emit(this.alternativeDatesList);
|
47
|
+
}
|
48
|
+
|
49
|
+
askDate()
|
50
|
+
{
|
51
|
+
this.closeAnotherDate.emit(false);
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
controlAlternativeDates()
|
57
|
+
{
|
58
|
+
let i = 0;
|
59
|
+
this.alternativeDatesList.forEach((item :AlternativeDate )=>
|
60
|
+
{
|
61
|
+
item.selected = (i===this.indexSelectedDate) ? "Yes" : "No";
|
62
|
+
i++
|
63
|
+
});
|
64
|
+
}
|
65
|
+
|
66
|
+
|
67
|
+
loadDates()
|
68
|
+
{
|
69
|
+
this.dates =[] ;
|
70
|
+
this.datesRef =[] ;
|
71
|
+
if(this.alternativeDatesList)
|
72
|
+
{
|
73
|
+
this.alternativeDatesList.forEach((element : AlternativeDate) => {
|
74
|
+
this.dates.push( new Date(element.startDateTime));
|
75
|
+
this.datesRef.push( new Date(element.startDateTime));
|
76
|
+
});
|
77
|
+
|
78
|
+
}
|
79
|
+
this.dateslength = this.dates.length ;
|
80
|
+
}
|
81
|
+
|
82
|
+
onSelect()
|
83
|
+
{
|
84
|
+
if( this.dateslength < this.dates.length )
|
85
|
+
{
|
86
|
+
this.loadDates();
|
87
|
+
}
|
88
|
+
else if(this.dateslength > this.dates.length)
|
89
|
+
{
|
90
|
+
this.selectedDate = this.arrdiff(this.datesRef,this.dates)[0];
|
91
|
+
|
92
|
+
for (var i = 0; i < this.datesRef.length; i++) {
|
93
|
+
if(this.datesRef[i] == this.selectedDate )
|
94
|
+
{
|
95
|
+
this.indexSelectedDate = i;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
this.controlAlternativeDates();
|
99
|
+
this.accept();
|
100
|
+
this.loadDates() ;
|
101
|
+
}
|
102
|
+
this.dates ;
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
arrdiff (a1 :any, a2 :any) {
|
107
|
+
var a = [], diff = [];
|
108
|
+
for (var i = 0; i < a1.length; i++) {
|
109
|
+
a[a1[i]] = true;
|
110
|
+
}
|
111
|
+
for (var i = 0; i < a2.length; i++) {
|
112
|
+
if (a[a2[i]]) {
|
113
|
+
delete a[a2[i]];
|
114
|
+
} else {
|
115
|
+
a[a2[i]] = true;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
for (var k in a) {
|
119
|
+
diff.push(k);
|
120
|
+
}
|
121
|
+
return diff;
|
122
|
+
}
|
123
|
+
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<p-dialog [header]="globaltranslate.confirmation" [(visible)]="displayConfirmDialog" [modal]="true" [style]="{width: '50vw'}" (onHide)="rejectDate()" [maximizable]="true" [baseZIndex]="10000" [draggable]="false" [resizable]="false">
|
2
|
+
<div>
|
3
|
+
{{ isProposedDate ? translate.textProposed : translate.textAlternative }}
|
4
|
+
<div>
|
5
|
+
<br> <br>{{translate.start}} : <i class="pi pi-calendar"></i> <strong>
|
6
|
+
{{startDateTime | date: "EEE dd MMM yyyy":"":language}} </strong> {{translate.from}}: <strong>08:00 </strong>
|
7
|
+
<div *ngIf="detailedPmJobLinkedList.length>0">
|
8
|
+
<br> <p style="color:rgb(245, 57, 57) ;"><strong>{{ translate.textWarn }}</strong></p>
|
9
|
+
<ul>
|
10
|
+
<strong><li *ngFor="let detailedPmJob of detailedPmJobLinkedList">{{ detailedPmJob.pmJob.workorderNumber }}</li></strong>
|
11
|
+
|
12
|
+
</ul>
|
13
|
+
</div>
|
14
|
+
<br><br>
|
15
|
+
<p>{{translate.infoEmail}}</p>
|
16
|
+
|
17
|
+
</div>
|
18
|
+
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<ng-template pTemplate="footer">
|
22
|
+
<p-button icon="pi pi-times" (click)="rejectDate()" class="annuler" [label]="globaltranslate.no"></p-button>
|
23
|
+
<p-button icon="pi pi-check" (click)="confirmDate()" [label]="globaltranslate.yes" class="p-button-text"></p-button>
|
24
|
+
</ng-template>
|
25
|
+
</p-dialog>
|
26
|
+
<p-toast position="top-center"></p-toast>
|
File without changes
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
+
|
3
|
+
import { ConfirmDialogComponent } from './confirm-dialog.component';
|
4
|
+
|
5
|
+
describe('ConfirmDialogComponent', () => {
|
6
|
+
let component: ConfirmDialogComponent;
|
7
|
+
let fixture: ComponentFixture<ConfirmDialogComponent>;
|
8
|
+
|
9
|
+
beforeEach(async () => {
|
10
|
+
await TestBed.configureTestingModule({
|
11
|
+
declarations: [ ConfirmDialogComponent ]
|
12
|
+
})
|
13
|
+
.compileComponents();
|
14
|
+
});
|
15
|
+
|
16
|
+
beforeEach(() => {
|
17
|
+
fixture = TestBed.createComponent(ConfirmDialogComponent);
|
18
|
+
component = fixture.componentInstance;
|
19
|
+
fixture.detectChanges();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('should create', () => {
|
23
|
+
expect(component).toBeTruthy();
|
24
|
+
});
|
25
|
+
});
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
2
|
+
import { MessageService } from 'primeng/api';
|
3
|
+
import { DetailedPmJob } from '../../models/detailedPmJob.model';
|
4
|
+
@Component({
|
5
|
+
selector: 'app-confirm-dialog',
|
6
|
+
templateUrl: './confirm-dialog.component.html',
|
7
|
+
styleUrls: ['./confirm-dialog.component.scss']
|
8
|
+
})
|
9
|
+
export class ConfirmDialogComponent {
|
10
|
+
@Input() displayConfirmDialog!: boolean;
|
11
|
+
@Input() startDateTime!: any;
|
12
|
+
@Input() endDateTime!: any;
|
13
|
+
@Input() globaltranslate!: any;
|
14
|
+
@Input() translate!: any;
|
15
|
+
@Input() isProposedDate!: boolean;
|
16
|
+
@Input() detailedPmJobLinkedList: DetailedPmJob[] = [];
|
17
|
+
|
18
|
+
@Output() closeConfirmDialog = new EventEmitter<boolean>();
|
19
|
+
|
20
|
+
languageStored : string | null = localStorage.getItem("lang");
|
21
|
+
language: string = this.languageStored ? this.languageStored : navigator.language.substr(0, 2).toLowerCase();
|
22
|
+
|
23
|
+
constructor(private messageService :MessageService) {
|
24
|
+
}
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
rejectDate()
|
29
|
+
{
|
30
|
+
this.closeConfirmDialog.emit(false);
|
31
|
+
this.messageService.add({ severity: 'error', summary: this.globaltranslate.summaryReject, detail: this.globaltranslate.detailReject });
|
32
|
+
}
|
33
|
+
|
34
|
+
confirmDate()
|
35
|
+
{
|
36
|
+
this.closeConfirmDialog.emit(true);
|
37
|
+
}
|
38
|
+
|
39
|
+
}
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<p-dialog [header]="globaltranslate.confirmation" [(visible)]="displayConfirmDialogContact" [modal]="true" [style]="{width: '50vw'}" (onHide)="rejectDate()" [maximizable]="true" [baseZIndex]="10000" [draggable]="false" [resizable]="false">
|
2
|
+
{{ translate.text }}<br>
|
3
|
+
<!-- <br>{{translate.start}} : <i class="pi pi-calendar"></i> <strong>
|
4
|
+
{{startDateTime | date: 'dd MMM yyyy'}} </strong> {{translate.from}}: <strong>08:00 </strong> -->
|
5
|
+
<div *ngIf="detailedPmJobLinkedList.length>0">
|
6
|
+
<br> <p style="color:rgb(245, 57, 57) ;"><strong>{{ translate.textWarn }}</strong></p>
|
7
|
+
<ul>
|
8
|
+
<strong><li *ngFor="let detailedPmJob of detailedPmJobLinkedList">{{ detailedPmJob.pmJob.workorderNumber }}</li></strong>
|
9
|
+
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<br><br>
|
13
|
+
<!-- <p>{{translate.infoEmail}}</p> -->
|
14
|
+
<ng-template pTemplate="footer">
|
15
|
+
<p-button icon="pi pi-times" (click)="rejectDate()" class="annuler" [label]="globaltranslate.no"></p-button>
|
16
|
+
<p-button icon="pi pi-check" (click)="confirmDate()" [label]="globaltranslate.yes" class="p-button-text"></p-button>
|
17
|
+
</ng-template>
|
18
|
+
</p-dialog>
|
19
|
+
<p-toast position="top-center"></p-toast>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
+
|
3
|
+
import { ConfirmDialogContactComponent } from './confirm-dialog-contact.component';
|
4
|
+
|
5
|
+
describe('ConfirmDialogContactComponent', () => {
|
6
|
+
let component: ConfirmDialogContactComponent;
|
7
|
+
let fixture: ComponentFixture<ConfirmDialogContactComponent>;
|
8
|
+
|
9
|
+
beforeEach(async () => {
|
10
|
+
await TestBed.configureTestingModule({
|
11
|
+
declarations: [ ConfirmDialogContactComponent ]
|
12
|
+
})
|
13
|
+
.compileComponents();
|
14
|
+
|
15
|
+
fixture = TestBed.createComponent(ConfirmDialogContactComponent);
|
16
|
+
component = fixture.componentInstance;
|
17
|
+
fixture.detectChanges();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('should create', () => {
|
21
|
+
expect(component).toBeTruthy();
|
22
|
+
});
|
23
|
+
});
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
2
|
+
import { MessageService } from 'primeng/api';
|
3
|
+
import { DetailedPmJob } from '../../models/detailedPmJob.model';
|
4
|
+
|
5
|
+
@Component({
|
6
|
+
selector: 'app-confirm-dialog-contact',
|
7
|
+
templateUrl: './confirm-dialog-contact.component.html',
|
8
|
+
styleUrls: ['./confirm-dialog-contact.component.css']
|
9
|
+
})
|
10
|
+
export class ConfirmDialogContactComponent {
|
11
|
+
|
12
|
+
@Input() displayConfirmDialogContact!: boolean;
|
13
|
+
@Input() startDateTime!: any;
|
14
|
+
@Input() endDateTime!: any;
|
15
|
+
@Input() globaltranslate!: any;
|
16
|
+
@Input() translate!: any;
|
17
|
+
@Input() detailedPmJobLinkedList: DetailedPmJob[] = [];
|
18
|
+
|
19
|
+
@Output() closeConfirmDialogContact = new EventEmitter<boolean>();
|
20
|
+
|
21
|
+
constructor(private messageService :MessageService) { }
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
rejectDate()
|
26
|
+
{
|
27
|
+
this.closeConfirmDialogContact.emit(false);
|
28
|
+
this.messageService.add({ severity: 'error', summary: this.globaltranslate.summaryReject, detail: this.globaltranslate.detailReject });
|
29
|
+
}
|
30
|
+
|
31
|
+
confirmDate()
|
32
|
+
{
|
33
|
+
this.closeConfirmDialogContact.emit(true);
|
34
|
+
}
|
35
|
+
|
36
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<p-dialog [header]="globaltranslate.information" [(visible)]="displayConfirmedDateInfos" [modal]="true" [style]="{width: '50vw'}" (onHide)="confirmDate()" [maximizable]="true" [baseZIndex]="10000" [draggable]="false" [resizable]="false">
|
2
|
+
<i class="pi pi-check icon-check"></i>
|
3
|
+
|
4
|
+
|
5
|
+
<div *ngIf="moreDates" style="text-align:center ;">
|
6
|
+
<br><br>
|
7
|
+
{{translate.textMoreDates}}
|
8
|
+
<br><br>
|
9
|
+
|
10
|
+
</div>
|
11
|
+
<div *ngIf="!moreDates">
|
12
|
+
<div class="text-center">
|
13
|
+
<p> {{translate.text }} <br> {{translate.start}} : <i class="pi pi-calendar"></i> <strong>
|
14
|
+
{{startDateTime | date: "EEE dd MMM yyyy":"":language}}</strong> <br> {{translate.from}}: <strong>08:00 </strong> </p>
|
15
|
+
</div>
|
16
|
+
<br><br>
|
17
|
+
<p>{{translate.infoEmail}}</p>
|
18
|
+
|
19
|
+
</div>
|
20
|
+
|
21
|
+
|
22
|
+
<ng-template pTemplate="footer">
|
23
|
+
<p-button icon="pi pi-times " (click)="confirmDate()" label="Close" class=" text-center d-block"></p-button>
|
24
|
+
</ng-template>
|
25
|
+
</p-dialog>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
p-dialog{
|
2
|
+
p{
|
3
|
+
font-size: 14px;
|
4
|
+
line-height: 34px;
|
5
|
+
margin-top: 30px;
|
6
|
+
}
|
7
|
+
.icon-check{
|
8
|
+
text-align: center;
|
9
|
+
color: white;
|
10
|
+
background: var(--primarycolor);
|
11
|
+
width: 80px;
|
12
|
+
height: 80px;
|
13
|
+
display: flex ;
|
14
|
+
justify-content: center;
|
15
|
+
align-items: center;
|
16
|
+
border-radius: 50%;
|
17
|
+
font-size: 30px;
|
18
|
+
font-weight: bold;
|
19
|
+
margin:auto;
|
20
|
+
}
|
21
|
+
|
22
|
+
}
|
23
|
+
|
package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.spec.ts
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
+
|
3
|
+
import { ConfirmedDateInformationComponent } from './confirmed-date-information.component';
|
4
|
+
|
5
|
+
describe('ConfirmedDateInformationComponent', () => {
|
6
|
+
let component: ConfirmedDateInformationComponent;
|
7
|
+
let fixture: ComponentFixture<ConfirmedDateInformationComponent>;
|
8
|
+
|
9
|
+
beforeEach(async () => {
|
10
|
+
await TestBed.configureTestingModule({
|
11
|
+
declarations: [ ConfirmedDateInformationComponent ]
|
12
|
+
})
|
13
|
+
.compileComponents();
|
14
|
+
});
|
15
|
+
|
16
|
+
beforeEach(() => {
|
17
|
+
fixture = TestBed.createComponent(ConfirmedDateInformationComponent);
|
18
|
+
component = fixture.componentInstance;
|
19
|
+
fixture.detectChanges();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('should create', () => {
|
23
|
+
expect(component).toBeTruthy();
|
24
|
+
});
|
25
|
+
});
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { Component, EventEmitter, Input, Output, OnDestroy } from '@angular/core';
|
2
|
+
|
3
|
+
@Component({
|
4
|
+
selector: 'app-confirmed-date-information',
|
5
|
+
templateUrl: './confirmed-date-information.component.html',
|
6
|
+
styleUrls: ['./confirmed-date-information.component.scss']
|
7
|
+
})
|
8
|
+
export class ConfirmedDateInformationComponent implements OnDestroy {
|
9
|
+
@Input() displayConfirmedDateInfos!: boolean;
|
10
|
+
@Input() startDateTime!: any;
|
11
|
+
@Input() endDateTime!: any;
|
12
|
+
@Input() globaltranslate!: any;
|
13
|
+
@Input() translate!: any;
|
14
|
+
@Input() moreDates!: boolean;
|
15
|
+
@Output() closeConfirmedDateInfo = new EventEmitter<boolean>();
|
16
|
+
languageStored : string | null = localStorage.getItem("lang");
|
17
|
+
language: string = this.languageStored ? this.languageStored : navigator.language.substr(0, 2).toLowerCase();
|
18
|
+
constructor() { }
|
19
|
+
|
20
|
+
ngOnDestroy(): void {
|
21
|
+
// this.displayConfirmedDateInfos = false;
|
22
|
+
}
|
23
|
+
|
24
|
+
|
25
|
+
confirmDate()
|
26
|
+
{
|
27
|
+
this.closeConfirmedDateInfo.emit(true);
|
28
|
+
}
|
29
|
+
|
30
|
+
}
|