awf-test-lib 0.1.23 → 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 -30
- 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} +6 -3
- 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} +3 -1
- 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} +3 -1
- package/src/lib/models/pMGroupedJob.model.ts +4 -0
- package/{lib/models/pmJob.model.d.ts → src/lib/models/pmJob.model.ts} +7 -6
- package/src/lib/models/pmJobRequest.model.ts +6 -0
- package/{lib/models/pmJobStatus.d.ts → src/lib/models/pmJobStatus.ts} +8 -3
- 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} +3 -1
- 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} +1 -1
- 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} +18 -11
- 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} +16 -1
- 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/esm2020/awf-test-lib.mjs +0 -5
- package/esm2020/lib/core/core-routing.module.mjs +0 -18
- package/esm2020/lib/core/core.module.mjs +0 -51
- package/esm2020/lib/core/menu/menu.component.mjs +0 -40
- package/esm2020/lib/core/menu-consomer/menu-consomer.component.mjs +0 -27
- package/esm2020/lib/core/menu-ge-portal/menu-ge-portal.component.mjs +0 -105
- package/esm2020/lib/core/menu-warranty/menu-warranty.component.mjs +0 -35
- package/esm2020/lib/core/not-found/not-found.component.mjs +0 -19
- package/esm2020/lib/core/top-bar/top-bar.component.mjs +0 -41
- package/esm2020/lib/models/account.model.mjs +0 -3
- package/esm2020/lib/models/alternativeDate.model.mjs +0 -3
- package/esm2020/lib/models/applicationName.mjs +0 -7
- package/esm2020/lib/models/cancelPMMailRequest.model.mjs +0 -4
- package/esm2020/lib/models/customObject.model.mjs +0 -3
- package/esm2020/lib/models/detailedPmJob.model.mjs +0 -3
- package/esm2020/lib/models/emailStatus.mjs +0 -6
- package/esm2020/lib/models/emailType.mjs +0 -17
- package/esm2020/lib/models/eventStatus.mjs +0 -9
- package/esm2020/lib/models/field.mjs +0 -9
- package/esm2020/lib/models/language.mjs +0 -6
- package/esm2020/lib/models/mailRequest.model.mjs +0 -3
- package/esm2020/lib/models/pMGroupedJob.model.mjs +0 -3
- package/esm2020/lib/models/pmJob.model.mjs +0 -3
- package/esm2020/lib/models/pmJobRequest.model.mjs +0 -3
- package/esm2020/lib/models/pmJobStatus.mjs +0 -17
- package/esm2020/lib/models/reason.model.mjs +0 -3
- package/esm2020/lib/models/reasonCode.mjs +0 -9
- package/esm2020/lib/models/reasonContact.mjs +0 -8
- package/esm2020/lib/models/reportDateMailRequest.model.mjs +0 -4
- package/esm2020/lib/models/role.mjs +0 -7
- package/esm2020/lib/models/service.model.mjs +0 -3
- package/esm2020/lib/models/serviceName.mjs +0 -12
- package/esm2020/lib/models/socialLoginRequest.model.mjs +0 -3
- package/esm2020/lib/models/socialMadia.mjs +0 -5
- package/esm2020/lib/models/stingBoolean.mjs +0 -6
- package/esm2020/lib/models/system.mjs +0 -3
- package/esm2020/lib/models/theme.model.mjs +0 -2
- package/esm2020/lib/models/tokenStatus.mjs +0 -7
- package/esm2020/lib/models/warranty.mjs +0 -3
- package/esm2020/lib/pipes/pipes/pipes.module.mjs +0 -21
- package/esm2020/lib/pipes/subrtring-w.pipe.mjs +0 -20
- package/esm2020/lib/pipes/substring.pipe.mjs +0 -16
- package/esm2020/lib/shared/choose-another-date/choose-another-date.component.mjs +0 -110
- package/esm2020/lib/shared/confirm-dialog/confirm-dialog.component.mjs +0 -45
- package/esm2020/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.mjs +0 -42
- package/esm2020/lib/shared/confirmed-date-information/confirmed-date-information.component.mjs +0 -39
- package/esm2020/lib/shared/contact/contact.component.mjs +0 -160
- package/esm2020/lib/shared/contact-support/contact-support.component.mjs +0 -172
- package/esm2020/lib/shared/dashboard/dashboard.component.mjs +0 -35
- package/esm2020/lib/shared/maintenance-list/maintenance-list.component.mjs +0 -352
- package/esm2020/lib/shared/shared-routing.module.mjs +0 -18
- package/esm2020/lib/shared/shared.module.mjs +0 -144
- package/esm2020/lib/shared/show-links/show-links.component.mjs +0 -80
- package/esm2020/lib/shared/system-list/system-list.component.mjs +0 -33
- package/esm2020/public-api.mjs +0 -48
- package/fesm2015/awf-test-lib.mjs +0 -1654
- package/fesm2015/awf-test-lib.mjs.map +0 -1
- package/fesm2020/awf-test-lib.mjs +0 -1650
- package/fesm2020/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
package/karma.conf.js
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
// Karma configuration file, see link for more information
|
2
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
3
|
+
|
4
|
+
module.exports = function (config) {
|
5
|
+
config.set({
|
6
|
+
basePath: '',
|
7
|
+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
8
|
+
plugins: [
|
9
|
+
require('karma-jasmine'),
|
10
|
+
require('karma-chrome-launcher'),
|
11
|
+
require('karma-jasmine-html-reporter'),
|
12
|
+
require('karma-coverage'),
|
13
|
+
require('@angular-devkit/build-angular/plugins/karma')
|
14
|
+
],
|
15
|
+
client: {
|
16
|
+
jasmine: {
|
17
|
+
// you can add configuration options for Jasmine here
|
18
|
+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
19
|
+
// for example, you can disable the random execution with `random: false`
|
20
|
+
// or set a specific seed with `seed: 4321`
|
21
|
+
},
|
22
|
+
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
23
|
+
},
|
24
|
+
jasmineHtmlReporter: {
|
25
|
+
suppressAll: true // removes the duplicated traces
|
26
|
+
},
|
27
|
+
coverageReporter: {
|
28
|
+
dir: require('path').join(__dirname, '../../coverage/awf-test-lib'),
|
29
|
+
subdir: '.',
|
30
|
+
reporters: [
|
31
|
+
{ type: 'html' },
|
32
|
+
{ type: 'text-summary' }
|
33
|
+
]
|
34
|
+
},
|
35
|
+
reporters: ['progress', 'kjhtml'],
|
36
|
+
port: 9876,
|
37
|
+
colors: true,
|
38
|
+
logLevel: config.LOG_INFO,
|
39
|
+
autoWatch: true,
|
40
|
+
browsers: ['Chrome'],
|
41
|
+
singleRun: false,
|
42
|
+
restartOnFileChange: true
|
43
|
+
});
|
44
|
+
};
|
package/ng-package.json
ADDED
package/package.json
CHANGED
@@ -1,31 +1,11 @@
|
|
1
|
-
{
|
2
|
-
"name": "awf-test-lib",
|
3
|
-
"version": "0.1.
|
4
|
-
"peerDependencies": {
|
5
|
-
"@angular/common": "^17.2.2",
|
6
|
-
"@angular/core": "^17.2.2"
|
7
|
-
},
|
8
|
-
"dependencies": {
|
9
|
-
"tslib": "^2.3.0"
|
10
|
-
}
|
11
|
-
"module": "fesm2015/awf-test-lib.mjs",
|
12
|
-
"es2020": "fesm2020/awf-test-lib.mjs",
|
13
|
-
"esm2020": "esm2020/awf-test-lib.mjs",
|
14
|
-
"fesm2020": "fesm2020/awf-test-lib.mjs",
|
15
|
-
"fesm2015": "fesm2015/awf-test-lib.mjs",
|
16
|
-
"typings": "index.d.ts",
|
17
|
-
"exports": {
|
18
|
-
"./package.json": {
|
19
|
-
"default": "./package.json"
|
20
|
-
},
|
21
|
-
".": {
|
22
|
-
"types": "./index.d.ts",
|
23
|
-
"esm2020": "./esm2020/awf-test-lib.mjs",
|
24
|
-
"es2020": "./fesm2020/awf-test-lib.mjs",
|
25
|
-
"es2015": "./fesm2015/awf-test-lib.mjs",
|
26
|
-
"node": "./fesm2015/awf-test-lib.mjs",
|
27
|
-
"default": "./fesm2020/awf-test-lib.mjs"
|
28
|
-
}
|
29
|
-
},
|
30
|
-
"sideEffects": false
|
1
|
+
{
|
2
|
+
"name": "awf-test-lib",
|
3
|
+
"version": "0.1.25",
|
4
|
+
"peerDependencies": {
|
5
|
+
"@angular/common": "^17.2.2",
|
6
|
+
"@angular/core": "^17.2.2"
|
7
|
+
},
|
8
|
+
"dependencies": {
|
9
|
+
"tslib": "^2.3.0"
|
10
|
+
}
|
31
11
|
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { NgModule } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { CoreRoutingModule } from './core-routing.module';
|
4
|
+
import { NotFoundComponent } from './not-found/not-found.component';
|
5
|
+
import {MegaMenuModule} from 'primeng/megamenu';
|
6
|
+
import { TopBarComponent } from './top-bar/top-bar.component';
|
7
|
+
import { MenuComponent } from './menu/menu.component';
|
8
|
+
import { MenuWarrantyComponent } from './menu-warranty/menu-warranty.component';
|
9
|
+
import { MenuConsomerComponent } from './menu-consomer/menu-consomer.component';
|
10
|
+
import { MenuGePortalComponent } from './menu-ge-portal/menu-ge-portal.component';
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
@NgModule({
|
16
|
+
declarations: [
|
17
|
+
TopBarComponent,
|
18
|
+
NotFoundComponent,
|
19
|
+
MenuComponent,
|
20
|
+
MenuWarrantyComponent,
|
21
|
+
MenuConsomerComponent,
|
22
|
+
MenuGePortalComponent,
|
23
|
+
],
|
24
|
+
imports: [
|
25
|
+
CommonModule,
|
26
|
+
CoreRoutingModule,
|
27
|
+
MegaMenuModule
|
28
|
+
],
|
29
|
+
exports: [
|
30
|
+
NotFoundComponent,
|
31
|
+
MenuComponent,
|
32
|
+
TopBarComponent,
|
33
|
+
]
|
34
|
+
})
|
35
|
+
export class CoreModule { }
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/*--------------------------------------------------------------
|
2
|
+
# Sidebar
|
3
|
+
--------------------------------------------------------------*/
|
4
|
+
.layout-menu .logo img {
|
5
|
+
width: 150px;
|
6
|
+
max-height: 20px;
|
7
|
+
margin-left: 24px;
|
8
|
+
}
|
9
|
+
@media (max-width: var(--smscreen)) {
|
10
|
+
.layout-menu .logo img {
|
11
|
+
max-height: 33px;
|
12
|
+
margin-left: 0px;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
.layout-menu .a {
|
16
|
+
font-family: var(--font);
|
17
|
+
}
|
18
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
<awf-menu-warranty [haveConsumerDataId]="haveConsumerDataId" [translate]="translate" [isAdmin]="isAdmin" *ngIf="applicationName ==='WarrantyPortal' " (logOutClick)=logout() (hideMenu)="hideMenuMethode()">
|
4
|
+
</awf-menu-warranty>
|
5
|
+
<awf-menu-consomer [translate]="translate" [isAdmin]="isAdmin" *ngIf="applicationName ==='ConsomerPortal' " (logOutClick)=logout() (hideMenu)="hideMenuMethode()">
|
6
|
+
</awf-menu-consomer>
|
7
|
+
<awf-menu-ge-portal [translate]="translate" [isAdmin]="isAdmin" *ngIf="applicationName ==='GEPortal' " (logOutClick)=logout() (hideMenu)="hideMenuMethode()">
|
8
|
+
</awf-menu-ge-portal>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
+
|
3
|
+
import { MenuComponent } from './menu.component';
|
4
|
+
|
5
|
+
describe('MenuComponent', () => {
|
6
|
+
let component: MenuComponent;
|
7
|
+
let fixture: ComponentFixture<MenuComponent>;
|
8
|
+
|
9
|
+
beforeEach(async () => {
|
10
|
+
await TestBed.configureTestingModule({
|
11
|
+
declarations: [ MenuComponent ]
|
12
|
+
})
|
13
|
+
.compileComponents();
|
14
|
+
|
15
|
+
fixture = TestBed.createComponent(MenuComponent);
|
16
|
+
component = fixture.componentInstance;
|
17
|
+
fixture.detectChanges();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('should create', () => {
|
21
|
+
expect(component).toBeTruthy();
|
22
|
+
});
|
23
|
+
});
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { Component,EventEmitter, Output, Input, OnInit } from '@angular/core';
|
2
|
+
@Component({
|
3
|
+
selector: 'awf-menu',
|
4
|
+
templateUrl: './menu.component.html',
|
5
|
+
styleUrls: ['./menu.component.css']
|
6
|
+
})
|
7
|
+
export class MenuComponent implements OnInit {
|
8
|
+
@Output() logOutClick: EventEmitter<any> = new EventEmitter();
|
9
|
+
@Output() hideMenu: EventEmitter<any> = new EventEmitter();
|
10
|
+
@Input() active!: boolean ;
|
11
|
+
@Input() isAdmin!: boolean ;
|
12
|
+
@Input() translate!: any;
|
13
|
+
@Input() applicationName!: any;
|
14
|
+
@Input() haveConsumerDataId!: boolean ;
|
15
|
+
constructor() { }
|
16
|
+
ngOnInit(): void {}
|
17
|
+
|
18
|
+
|
19
|
+
logout() {
|
20
|
+
this.logOutClick.emit();
|
21
|
+
}
|
22
|
+
|
23
|
+
hideMenuMethode()
|
24
|
+
{
|
25
|
+
this.hideMenu.emit();
|
26
|
+
}
|
27
|
+
|
28
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<div class="layout-menu" *ngIf="translate">
|
2
|
+
<div class="menu-category"> <i class="pi pi-home"></i> {{translate.general}}</div>
|
3
|
+
<div class="menu-items">
|
4
|
+
<a routerLink="./">{{translate.Homepage}}</a>
|
5
|
+
<a routerLink="./device">{{translate.myDevices}}</a>
|
6
|
+
<a routerLink="./personalData">{{translate.personalData}}</a>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="menu-category" *ngIf="isAdmin "> <i class="pi pi-cog"></i> {{translate.config}}</div>
|
10
|
+
<div class="menu-items" *ngIf="isAdmin ">
|
11
|
+
<a routerLink="./theme">{{translate.themes}}</a>
|
12
|
+
<a routerLink="./servicesConfig">{{translate.services}}</a>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="menu-category"> <i class="pi pi-user"></i> {{translate.account}}</div>
|
16
|
+
<div class="menu-items">
|
17
|
+
<a >{{translate.profile}}</a>
|
18
|
+
<a (click)="logout()">{{translate.logout}}</a>
|
19
|
+
</div>
|
20
|
+
</div>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*--------------------------------------------------------------
|
2
|
+
# Sidebar
|
3
|
+
--------------------------------------------------------------*/
|
4
|
+
|
5
|
+
.layout-menu {
|
6
|
+
.logo {
|
7
|
+
img {
|
8
|
+
width: 150px;
|
9
|
+
max-height: 20px;
|
10
|
+
margin-left: 24px;
|
11
|
+
@media (max-width: var(--smscreen)) {
|
12
|
+
max-height: 33px;
|
13
|
+
margin-left: 0px;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
.a {
|
18
|
+
font-family: var(--font);
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
+
|
3
|
+
import { MenuConsomerComponent } from './menu-consomer.component';
|
4
|
+
|
5
|
+
describe('MenuConsomerComponent', () => {
|
6
|
+
let component: MenuConsomerComponent;
|
7
|
+
let fixture: ComponentFixture<MenuConsomerComponent>;
|
8
|
+
|
9
|
+
beforeEach(async () => {
|
10
|
+
await TestBed.configureTestingModule({
|
11
|
+
declarations: [ MenuConsomerComponent ]
|
12
|
+
})
|
13
|
+
.compileComponents();
|
14
|
+
});
|
15
|
+
|
16
|
+
beforeEach(() => {
|
17
|
+
fixture = TestBed.createComponent(MenuConsomerComponent);
|
18
|
+
component = fixture.componentInstance;
|
19
|
+
fixture.detectChanges();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('should create', () => {
|
23
|
+
expect(component).toBeTruthy();
|
24
|
+
});
|
25
|
+
});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
|
2
|
+
|
3
|
+
@Component({
|
4
|
+
selector: 'awf-menu-consomer',
|
5
|
+
templateUrl: './menu-consomer.component.html',
|
6
|
+
styleUrls: ['./menu-consomer.component.scss']
|
7
|
+
})
|
8
|
+
export class MenuConsomerComponent implements OnChanges {
|
9
|
+
@Output() logOutClick: EventEmitter<any> = new EventEmitter();
|
10
|
+
@Input() translate!: any;
|
11
|
+
@Input() isAdmin!: boolean;
|
12
|
+
constructor() { }
|
13
|
+
|
14
|
+
ngOnChanges(): void {
|
15
|
+
}
|
16
|
+
|
17
|
+
logout() {
|
18
|
+
this.logOutClick.emit();
|
19
|
+
}
|
20
|
+
|
21
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<div class="layout-menu" *ngIf="translate">
|
2
|
+
<div class="menu" (click)="menuMethode()"> <i class="pi pi-home"></i> {{translate.home}}</div>
|
3
|
+
<div class="menu" (click)="menuMethode('contact')"> <i class="pi pi-phone"></i> {{translate.contact}}</div>
|
4
|
+
<div class="menu" (click)="menuMethode('systems')"> <i class="pi pi-eye"></i> {{translate.systems}}</div>
|
5
|
+
<div class="menu" (click)="menuMethode('maintenance')"> <i class="pi pi-inbox"></i> {{translate.maintenance}}</div>
|
6
|
+
<div class="menu" (click)="logout()"> <i class="pi pi-power-off"></i> {{translate.logout}}</div>
|
7
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
.layout-menu {
|
2
|
+
margin-left: 50px;
|
3
|
+
|
4
|
+
.menu {
|
5
|
+
display: block;
|
6
|
+
color: #8DA1B5;
|
7
|
+
font-weight: 300;
|
8
|
+
padding: 1rem 0 0.5rem 0;
|
9
|
+
font-size: 16px;
|
10
|
+
cursor: pointer;
|
11
|
+
&:hover {
|
12
|
+
font-weight: bold;
|
13
|
+
color: var(--primarycolor);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
+
|
3
|
+
import { MenuGePortalComponent } from './menu-ge-portal.component';
|
4
|
+
|
5
|
+
describe('MenuGePortalComponent', () => {
|
6
|
+
let component: MenuGePortalComponent;
|
7
|
+
let fixture: ComponentFixture<MenuGePortalComponent>;
|
8
|
+
|
9
|
+
beforeEach(async () => {
|
10
|
+
await TestBed.configureTestingModule({
|
11
|
+
declarations: [ MenuGePortalComponent ]
|
12
|
+
})
|
13
|
+
.compileComponents();
|
14
|
+
});
|
15
|
+
|
16
|
+
beforeEach(() => {
|
17
|
+
fixture = TestBed.createComponent(MenuGePortalComponent);
|
18
|
+
component = fixture.componentInstance;
|
19
|
+
fixture.detectChanges();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('should create', () => {
|
23
|
+
expect(component).toBeTruthy();
|
24
|
+
});
|
25
|
+
});
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
2
|
+
import { Router } from '@angular/router';
|
3
|
+
import { jwtDecode } from "jwt-decode";
|
4
|
+
|
5
|
+
@Component({
|
6
|
+
selector: 'awf-menu-ge-portal',
|
7
|
+
templateUrl: './menu-ge-portal.component.html',
|
8
|
+
styleUrls: ['./menu-ge-portal.component.scss']
|
9
|
+
})
|
10
|
+
export class MenuGePortalComponent {
|
11
|
+
@Output() logOutClick: EventEmitter<any> = new EventEmitter();
|
12
|
+
@Input() translate!: any;
|
13
|
+
@Input() isAdmin!: boolean;
|
14
|
+
@Output() hideMenu: EventEmitter<any> = new EventEmitter();
|
15
|
+
displayViewAs : boolean = false;
|
16
|
+
|
17
|
+
constructor(private readonly router : Router) {
|
18
|
+
this.displayViewAs = !this.isTokenExpired();
|
19
|
+
}
|
20
|
+
|
21
|
+
logout() {
|
22
|
+
this.displayViewAs = !this.isTokenExpired();
|
23
|
+
if(this.displayViewAs){
|
24
|
+
this.deleteConnexionInfo();
|
25
|
+
this.navigate("/ge")
|
26
|
+
}else{
|
27
|
+
this.logOutClick.emit();
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
menuMethode(path? : string) {
|
32
|
+
this.redirectByPath(path);
|
33
|
+
this.hideMenu.emit();
|
34
|
+
}
|
35
|
+
|
36
|
+
isTokenExpired(): boolean {
|
37
|
+
const token = sessionStorage.getItem("va-token") ? sessionStorage.getItem("va-token") : localStorage.getItem("va-token")
|
38
|
+
if (!token) {
|
39
|
+
return true; // Token absent, considéré comme expiré
|
40
|
+
}
|
41
|
+
const tokenData : any = jwtDecode(token);
|
42
|
+
const expirationTime = tokenData?.exp; // Convertir en millisecondes
|
43
|
+
const currentTimeInSeconds = Math.floor(Date.now() / 1000); // Temps actuel en secondes
|
44
|
+
const isExpired = expirationTime ? expirationTime < currentTimeInSeconds : true;
|
45
|
+
if(isExpired){
|
46
|
+
this.deleteConnexionInfo();
|
47
|
+
}
|
48
|
+
return isExpired
|
49
|
+
|
50
|
+
}
|
51
|
+
redirectByPath(path? : string){
|
52
|
+
this.displayViewAs = !this.isTokenExpired();
|
53
|
+
if(this.displayViewAs){
|
54
|
+
switch (path) {
|
55
|
+
case null || undefined || '' : this.navigate('/ge/view-as/home'); break;
|
56
|
+
case 'contact' : this.navigate('/ge/view-as/contact'); break;
|
57
|
+
case 'maintenance' : this.navigate('/ge/view-as/maintenance'); break;
|
58
|
+
case 'systems' : this.navigate('/ge/view-as/systems'); break;
|
59
|
+
default: this.navigate('/ge/view-as/home');
|
60
|
+
}
|
61
|
+
}else {
|
62
|
+
switch (path) {
|
63
|
+
case null || undefined || '' : this.navigate('/ge'); break;
|
64
|
+
case 'contact' : this.navigate('/ge/contact'); break;
|
65
|
+
case 'maintenance' : this.navigate('/ge/maintenance'); break;
|
66
|
+
case 'systems' : this.navigate('/ge/systems'); break;
|
67
|
+
default: this.navigate('/ge');
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
deleteConnexionInfo(){
|
72
|
+
sessionStorage.removeItem("va-token");
|
73
|
+
sessionStorage.removeItem("va-email");
|
74
|
+
localStorage.removeItem("va-token");
|
75
|
+
localStorage.removeItem("va-email");
|
76
|
+
sessionStorage.setItem("va","false")
|
77
|
+
localStorage.setItem("va","false")
|
78
|
+
}
|
79
|
+
navigate(route: string):void{
|
80
|
+
this.router.navigate([route])
|
81
|
+
}
|
82
|
+
|
83
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<div class="layout-menu" *ngIf="translate">
|
2
|
+
<div class="menu-category"> <i class="pi pi-home"></i> {{translate.general}}</div>
|
3
|
+
<div class="menu-items">
|
4
|
+
<a routerLink="./warranties" (click)="hideMenuMethode()">{{translate.Homepage}}</a>
|
5
|
+
<a routerLink="./device" (click)="hideMenuMethode()">{{translate.devices}}</a>
|
6
|
+
</div>
|
7
|
+
<div class="menu-category" *ngIf="isAdmin "> <i class="pi pi-cog"></i> {{translate.config}}</div>
|
8
|
+
<div class="menu-items" *ngIf="isAdmin ">
|
9
|
+
|
10
|
+
<a routerLink="./theme" (click)="hideMenuMethode()">{{translate.themes}}</a>
|
11
|
+
<a routerLink="./servicesConfig" (click)="hideMenuMethode()">{{translate.services}}</a>
|
12
|
+
</div>
|
13
|
+
<div class="menu-category"> <i class="pi pi-user"></i> {{translate.account}}</div>
|
14
|
+
<div class="menu-items">
|
15
|
+
<a routerLink="./account" *ngIf="haveConsumerDataId" (click)="hideMenuMethode()">{{translate.personalData}}</a>
|
16
|
+
<a routerLink="./account/optionsList" *ngIf="haveConsumerDataId" (click)="hideMenuMethode()">{{translate.optionsList}}</a>
|
17
|
+
<a routerLink="./account/change-password" *ngIf="haveConsumerDataId" (click)="hideMenuMethode()">{{translate.changePassword}}</a>
|
18
|
+
<a (click)="logout()">{{translate.logout}}</a>
|
19
|
+
</div>
|
20
|
+
</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
+
|
3
|
+
import { MenuWarrantyComponent } from './menu-warranty.component';
|
4
|
+
|
5
|
+
describe('MenuWarrantyComponent', () => {
|
6
|
+
let component: MenuWarrantyComponent;
|
7
|
+
let fixture: ComponentFixture<MenuWarrantyComponent>;
|
8
|
+
|
9
|
+
beforeEach(async () => {
|
10
|
+
await TestBed.configureTestingModule({
|
11
|
+
declarations: [ MenuWarrantyComponent ]
|
12
|
+
})
|
13
|
+
.compileComponents();
|
14
|
+
});
|
15
|
+
|
16
|
+
beforeEach(() => {
|
17
|
+
fixture = TestBed.createComponent(MenuWarrantyComponent);
|
18
|
+
component = fixture.componentInstance;
|
19
|
+
fixture.detectChanges();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('should create', () => {
|
23
|
+
expect(component).toBeTruthy();
|
24
|
+
});
|
25
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
@Component({
|
7
|
+
selector: 'awf-menu-warranty',
|
8
|
+
templateUrl: './menu-warranty.component.html',
|
9
|
+
styleUrls: ['./menu-warranty.component.scss']
|
10
|
+
})
|
11
|
+
export class MenuWarrantyComponent implements OnInit {
|
12
|
+
@Output() logOutClick: EventEmitter<any> = new EventEmitter();
|
13
|
+
@Output() hideMenu: EventEmitter<any> = new EventEmitter();
|
14
|
+
@Input() isAdmin!: boolean;
|
15
|
+
@Input() translate!: any;
|
16
|
+
@Input() haveConsumerDataId!: boolean;
|
17
|
+
|
18
|
+
|
19
|
+
constructor( ) { }
|
20
|
+
|
21
|
+
ngOnInit(): void {
|
22
|
+
|
23
|
+
|
24
|
+
}
|
25
|
+
logout() { this.logOutClick.emit();
|
26
|
+
}
|
27
|
+
hideMenuMethode()
|
28
|
+
{
|
29
|
+
this.hideMenu.emit();
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
.container{
|
4
|
+
display: flex;
|
5
|
+
flex-direction: column;
|
6
|
+
align-items: center;
|
7
|
+
width: 100%;
|
8
|
+
background-color: #5ca3dd93;
|
9
|
+
}
|
10
|
+
h2{
|
11
|
+
font-size: 150px;
|
12
|
+
margin: 0;
|
13
|
+
text-shadow: 15px 5px 2px black;
|
14
|
+
}
|
15
|
+
h3{
|
16
|
+
font-size: 40px;
|
17
|
+
margin: 20px;
|
18
|
+
}
|
19
|
+
p{
|
20
|
+
font-size: 18px;
|
21
|
+
margin: 5px;
|
22
|
+
}
|
23
|
+
p:last-of-type{
|
24
|
+
margin-bottom: 35px;
|
25
|
+
}
|
26
|
+
a{
|
27
|
+
text-decoration: none;
|
28
|
+
|
29
|
+
}
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
+
|
3
|
+
import { NotFoundComponent } from './not-found.component';
|
4
|
+
|
5
|
+
describe('NotFoundComponent', () => {
|
6
|
+
let component: NotFoundComponent;
|
7
|
+
let fixture: ComponentFixture<NotFoundComponent>;
|
8
|
+
|
9
|
+
beforeEach(async () => {
|
10
|
+
await TestBed.configureTestingModule({
|
11
|
+
declarations: [ NotFoundComponent ]
|
12
|
+
})
|
13
|
+
.compileComponents();
|
14
|
+
|
15
|
+
fixture = TestBed.createComponent(NotFoundComponent);
|
16
|
+
component = fixture.componentInstance;
|
17
|
+
fixture.detectChanges();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('should create', () => {
|
21
|
+
expect(component).toBeTruthy();
|
22
|
+
});
|
23
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Component, OnChanges,Input } from '@angular/core';
|
2
|
+
|
3
|
+
@Component({
|
4
|
+
selector: 'awf-not-found',
|
5
|
+
templateUrl: './not-found.component.html',
|
6
|
+
styleUrls: ['./not-found.component.css']
|
7
|
+
})
|
8
|
+
export class NotFoundComponent implements OnChanges {
|
9
|
+
@Input() translate!: any;
|
10
|
+
@Input() applicationName!: any;
|
11
|
+
constructor() { }
|
12
|
+
|
13
|
+
ngOnChanges(): void {}
|
14
|
+
|
15
|
+
}
|