diff --git a/.github/workflows/dotnet-core-master.yml b/.github/workflows/dotnet-core-master.yml index 1559bd47..9d5ae91e 100644 --- a/.github/workflows/dotnet-core-master.yml +++ b/.github/workflows/dotnet-core-master.yml @@ -89,6 +89,8 @@ jobs: mkdir -p eform-angular-frontend/eform-client/cypress/e2e/plugins/ mkdir -p eform-angular-frontend/eform-client/cypress/fixtures/ cd eform-angular-frontend/eform-client && ../../eform-angular-basecustomer-plugin/testinginstallpn.sh + - name: Enable Corepack + run: corepack enable - name: yarn install run: cd eform-angular-frontend/eform-client && yarn install - name: Install Playwright browsers diff --git a/.github/workflows/dotnet-core-pr.yml b/.github/workflows/dotnet-core-pr.yml index d36a912a..b135e289 100644 --- a/.github/workflows/dotnet-core-pr.yml +++ b/.github/workflows/dotnet-core-pr.yml @@ -16,7 +16,7 @@ jobs: with: fetch-depth: 0 repository: microting/eform-angular-frontend - ref: stable + ref: ${{ github.base_ref }} path: eform-angular-frontend - name: Copy dependencies run: | @@ -70,7 +70,7 @@ jobs: uses: actions/checkout@v3 with: repository: microting/eform-angular-frontend - ref: stable + ref: ${{ github.base_ref }} path: eform-angular-frontend - name: Copy dependencies run: | @@ -81,6 +81,8 @@ jobs: mkdir -p eform-angular-frontend/eform-client/cypress/e2e/plugins/ mkdir -p eform-angular-frontend/eform-client/cypress/fixtures/ cd eform-angular-frontend/eform-client && ../../eform-angular-basecustomer-plugin/testinginstallpn.sh + - name: Enable Corepack + run: corepack enable - name: yarn install run: cd eform-angular-frontend/eform-client && yarn install - name: Install Playwright browsers diff --git a/Dockerfile b/Dockerfile index 322d7fc8..bb520d52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM node:22-bookworm-slim as node-env WORKDIR /app ENV PATH /app/node_modules/.bin:$PATH COPY eform-angular-frontend/eform-client ./ +RUN corepack enable RUN yarn install RUN yarn build diff --git a/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.ts b/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.ts index 8f847120..a2915c9a 100644 --- a/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.ts +++ b/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.ts @@ -1,19 +1,33 @@ import {Component, EventEmitter, OnDestroy, OnInit, inject} from '@angular/core'; -import {FormBuilder, FormGroup} from '@angular/forms'; +import {FormBuilder, FormGroup, ReactiveFormsModule} from '@angular/forms'; import {AutoUnsubscribe} from 'ngx-auto-unsubscribe'; import {Subscription} from 'rxjs'; import {CustomerPnFieldsEnum, CustomersPnFieldStatusEnum} from '../../enums'; import {FieldsPnUpdateModel, CustomerPnFullModel} from '../../models'; import {CustomersPnService} from '../../services'; -import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog'; +import {MAT_DIALOG_DATA, MatDialogActions, MatDialogContent, MatDialogRef, MatDialogTitle} from '@angular/material/dialog'; +import {NgIf} from '@angular/common'; +import {TranslatePipe} from '@ngx-translate/core'; +import {MatFormField, MatLabel} from '@angular/material/form-field'; +import {MatInput} from '@angular/material/input'; @AutoUnsubscribe() @Component({ selector: 'app-customer-pn-add', templateUrl: './customer-pn-add.component.html', styleUrls: ['./customer-pn-add.component.scss'], - standalone: false + imports: [ + NgIf, + ReactiveFormsModule, + TranslatePipe, + MatDialogTitle, + MatDialogContent, + MatDialogActions, + MatFormField, + MatLabel, + MatInput + ] }) export class CustomerPnAddComponent implements OnInit, OnDestroy { private customersService = inject(CustomersPnService); diff --git a/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-delete/customer-pn-delete.component.ts b/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-delete/customer-pn-delete.component.ts index 4cacb414..a4ef4dca 100644 --- a/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-delete/customer-pn-delete.component.ts +++ b/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-delete/customer-pn-delete.component.ts @@ -6,14 +6,20 @@ import {CustomerPnFieldsEnum} from '../../enums'; import {CustomerPnModel} from '../../models/customer'; import {FieldsPnUpdateModel} from '../../models/field'; import {CustomersPnService} from '../../services'; -import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog'; +import {MAT_DIALOG_DATA, MatDialogActions, MatDialogContent, MatDialogRef, MatDialogTitle} from '@angular/material/dialog'; +import {TranslatePipe} from '@ngx-translate/core'; @AutoUnsubscribe() @Component({ selector: 'app-customer-pn-delete', templateUrl: './customer-pn-delete.component.html', styleUrls: ['./customer-pn-delete.component.scss'], - standalone: false + imports: [ + TranslatePipe, + MatDialogTitle, + MatDialogContent, + MatDialogActions + ] }) export class CustomerPnDeleteComponent implements OnInit, OnDestroy { private customersService = inject(CustomersPnService); diff --git a/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-edit/customer-pn-edit.component.ts b/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-edit/customer-pn-edit.component.ts index b7b4ebef..30aef21f 100644 --- a/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-edit/customer-pn-edit.component.ts +++ b/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-edit/customer-pn-edit.component.ts @@ -1,19 +1,33 @@ import {Component, EventEmitter, OnDestroy, OnInit, inject} from '@angular/core'; -import {FormBuilder, FormGroup} from '@angular/forms'; +import {FormBuilder, FormGroup, ReactiveFormsModule} from '@angular/forms'; import {AutoUnsubscribe} from 'ngx-auto-unsubscribe'; import {Subscription} from 'rxjs'; import {CustomerPnFieldsEnum, CustomersPnFieldStatusEnum} from '../../enums'; import {FieldsPnUpdateModel, CustomerPnFullModel} from '../../models'; import {CustomersPnService} from '../../services'; -import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog'; +import {MAT_DIALOG_DATA, MatDialogActions, MatDialogContent, MatDialogRef, MatDialogTitle} from '@angular/material/dialog'; +import {NgIf} from '@angular/common'; +import {TranslatePipe} from '@ngx-translate/core'; +import {MatFormField, MatLabel} from '@angular/material/form-field'; +import {MatInput} from '@angular/material/input'; @AutoUnsubscribe() @Component({ selector: 'app-customer-pn-edit', templateUrl: './customer-pn-edit.component.html', styleUrls: ['./customer-pn-edit.component.scss'], - standalone: false + imports: [ + NgIf, + ReactiveFormsModule, + TranslatePipe, + MatDialogTitle, + MatDialogContent, + MatDialogActions, + MatFormField, + MatLabel, + MatInput + ] }) export class CustomerPnEditComponent implements OnInit, OnDestroy { private customersService = inject(CustomersPnService); diff --git a/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-import/customer-pn-import.component.ts b/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-import/customer-pn-import.component.ts index 8e12e6b5..a68582b5 100644 --- a/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-import/customer-pn-import.component.ts +++ b/eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-import/customer-pn-import.component.ts @@ -1,6 +1,16 @@ import { Component, OnInit, inject } from '@angular/core'; +import { NgFor, NgIf, SlicePipe } from '@angular/common'; +import { RouterLink } from '@angular/router'; +import { TranslatePipe } from '@ngx-translate/core'; +import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { MatIconButton } from '@angular/material/button'; +import { MatIcon } from '@angular/material/icon'; +import { MatSelect } from '@angular/material/select'; +import { MatOption } from '@angular/material/core'; +import { EformNewSubheaderComponent } from 'src/app/common/modules/eform-shared/components'; import { FileUploader } from 'ng2-file-upload'; import { Papa } from 'ngx-papaparse'; import { CustomersPnService } from '../../services'; @@ -14,7 +24,22 @@ const URL = ''; selector: 'app-customer-pn-import', templateUrl: './customer-pn-import.component.html', styleUrls: ['./customer-pn-import.component.scss'], - standalone: false + imports: [ + NgFor, + NgIf, + SlicePipe, + RouterLink, + TranslatePipe, + MatFormField, + MatLabel, + MatSuffix, + MatInput, + MatIconButton, + MatIcon, + MatSelect, + MatOption, + EformNewSubheaderComponent + ] }) export class CustomerPnImportComponent implements OnInit { private customerService = inject(CustomersPnService); diff --git a/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-container/customers-pn-container.component.ts b/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-container/customers-pn-container.component.ts index c6c23879..34f6d008 100644 --- a/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-container/customers-pn-container.component.ts +++ b/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-container/customers-pn-container.component.ts @@ -4,7 +4,17 @@ import { OnInit, inject } from '@angular/core'; +import {AsyncPipe} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {RouterLink} from '@angular/router'; +import {TranslatePipe} from '@ngx-translate/core'; import {MatDialog} from '@angular/material/dialog'; +import {MatFormField, MatLabel, MatSuffix} from '@angular/material/form-field'; +import {MatInput} from '@angular/material/input'; +import {MatIcon} from '@angular/material/icon'; +import {MatTooltip} from '@angular/material/tooltip'; +import {EformNewSubheaderComponent, EformPaginationComponent} from 'src/app/common/modules/eform-shared/components'; +import {CustomersPnTableComponent} from '../customers-pn-table/customers-pn-table.component'; import {Overlay} from '@angular/cdk/overlay'; import {Store} from '@ngrx/store'; import {Subscription, Subject} from 'rxjs'; @@ -31,7 +41,21 @@ import {dialogConfigHelper} from 'src/app/common/helpers'; selector: 'app-customers-pn-container', templateUrl: './customers-pn-container.component.html', styleUrls: ['./customers-pn-container.component.scss'], - standalone: false + imports: [ + AsyncPipe, + FormsModule, + RouterLink, + TranslatePipe, + MatFormField, + MatLabel, + MatSuffix, + MatInput, + MatIcon, + MatTooltip, + EformNewSubheaderComponent, + EformPaginationComponent, + CustomersPnTableComponent + ] }) export class CustomersPnContainerComponent implements OnInit, OnDestroy { private customersFieldsService = inject(CustomersPnFieldsService); diff --git a/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-fields/customers-pn-fields.component.ts b/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-fields/customers-pn-fields.component.ts index d985b4cc..c89e6ba3 100644 --- a/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-fields/customers-pn-fields.component.ts +++ b/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-fields/customers-pn-fields.component.ts @@ -1,7 +1,10 @@ import {Component, OnDestroy, OnInit, inject} from '@angular/core'; -import {Router} from '@angular/router'; +import {NgFor} from '@angular/common'; +import {Router, RouterLink} from '@angular/router'; +import {TranslatePipe} from '@ngx-translate/core'; +import {EformNewSubheaderComponent} from 'src/app/common/modules/eform-shared/components'; import {AutoUnsubscribe} from 'ngx-auto-unsubscribe'; -import {MatSlideToggleChange} from '@angular/material/slide-toggle'; +import {MatSlideToggle, MatSlideToggleChange} from '@angular/material/slide-toggle'; import {Subscription} from 'rxjs'; import {CustomersPnFieldStatusEnum} from '../../enums'; @@ -20,7 +23,13 @@ import { selector: 'app-customers-pn-fields', templateUrl: './customers-pn-fields.component.html', styleUrls: ['./customers-pn-fields.component.scss'], - standalone: false + imports: [ + NgFor, + RouterLink, + TranslatePipe, + MatSlideToggle, + EformNewSubheaderComponent + ] }) export class CustomersPnFieldsComponent implements OnInit, OnDestroy { private customersFieldsService = inject(CustomersPnFieldsService); diff --git a/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-table/customers-pn-table.component.ts b/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-table/customers-pn-table.component.ts index 345d7ae7..ba60d01d 100644 --- a/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-table/customers-pn-table.component.ts +++ b/eform-client/src/app/plugins/modules/customers-pn/components/customers-pn-table/customers-pn-table.component.ts @@ -6,9 +6,14 @@ import { Output, inject } from '@angular/core'; +import {AsyncPipe} from '@angular/common'; import {Store} from '@ngrx/store'; +import {TranslatePipe} from '@ngx-translate/core'; +import {MatIconButton} from '@angular/material/button'; +import {MatIcon} from '@angular/material/icon'; +import {MatMenu, MatMenuItem, MatMenuTrigger} from '@angular/material/menu'; import {Sort} from '@angular/material/sort'; -import {MtxGridColumn} from '@ng-matero/extensions/grid'; +import {MtxGrid, MtxGridColumn} from '@ng-matero/extensions/grid'; import {AuthStateService} from 'src/app/common/store'; import {CustomerPnModel, CustomersPnModel} from '../../models'; @@ -23,7 +28,16 @@ import {CustomersStateService} from '../store'; templateUrl: './customers-pn-table.component.html', styleUrls: ['./customers-pn-table.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + imports: [ + AsyncPipe, + TranslatePipe, + MtxGrid, + MatIconButton, + MatIcon, + MatMenu, + MatMenuItem, + MatMenuTrigger + ] }) export class CustomersPnTableComponent { private store = inject(Store); diff --git a/eform-client/src/app/plugins/modules/customers-pn/customers-pn.module.ts b/eform-client/src/app/plugins/modules/customers-pn/customers-pn.module.ts index e17af5d6..13839341 100644 --- a/eform-client/src/app/plugins/modules/customers-pn/customers-pn.module.ts +++ b/eform-client/src/app/plugins/modules/customers-pn/customers-pn.module.ts @@ -1,69 +1,17 @@ import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule, ReactiveFormsModule} from '@angular/forms'; -import {NgSelectModule} from '@ng-select/ng-select'; -import {TranslateModule} from '@ngx-translate/core'; -import {MtxGridModule} from '@ng-matero/extensions/grid'; import {MatDialogModule} from '@angular/material/dialog'; -import {MatFormFieldModule} from '@angular/material/form-field'; -import {MatInputModule} from '@angular/material/input'; -import {MatIconModule} from '@angular/material/icon'; -import {MatMenuModule} from '@angular/material/menu'; -import {MatSlideToggleModule} from '@angular/material/slide-toggle'; -import {MatTooltipModule} from '@angular/material/tooltip'; -import {MatButtonModule} from '@angular/material/button'; -import {MatSelectModule} from '@angular/material/select'; import {StoreModule} from '@ngrx/store'; -import {CustomerPnLayoutComponent} from './layouts'; import {CustomersPnFieldsService, CustomersPnService, CustomersPnSettingsService} from './services'; import {CustomersPnRouting} from './customers-pn.routing'; -import {SharedPnModule} from '../shared/shared-pn.module'; -import {EformSharedModule} from 'src/app/common/modules/eform-shared/eform-shared.module'; import {customersReducer} from './state'; -import { - CustomerPnDeleteComponent, - CustomerPnEditComponent, - CustomersPnContainerComponent, - CustomersPnTableComponent, - CustomersPnFieldsComponent, - CustomerPnAddComponent, - CustomerPnImportComponent -} from './components'; - @NgModule({ imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - SharedPnModule, - CustomersPnRouting, - TranslateModule, - NgSelectModule, - EformSharedModule, - MtxGridModule, MatDialogModule, - MatFormFieldModule, - MatInputModule, - MatIconModule, - MatMenuModule, - MatSlideToggleModule, - MatTooltipModule, - MatButtonModule, - MatSelectModule, + CustomersPnRouting, StoreModule.forFeature('customersPn', {customersState: customersReducer}), ], - declarations: [ - CustomerPnLayoutComponent, - CustomersPnContainerComponent, - CustomersPnTableComponent, - CustomerPnEditComponent, - CustomerPnDeleteComponent, - CustomersPnFieldsComponent, - CustomerPnAddComponent, - CustomerPnImportComponent - ], providers: [ CustomersPnService, CustomersPnFieldsService, diff --git a/eform-client/src/app/plugins/modules/customers-pn/layouts/customer-pn-layout.component.ts b/eform-client/src/app/plugins/modules/customers-pn/layouts/customer-pn-layout.component.ts index 2f4b45f6..0518b7d6 100644 --- a/eform-client/src/app/plugins/modules/customers-pn/layouts/customer-pn-layout.component.ts +++ b/eform-client/src/app/plugins/modules/customers-pn/layouts/customer-pn-layout.component.ts @@ -1,6 +1,7 @@ import { AfterContentInit, Component, OnInit, inject } from '@angular/core'; +import { RouterOutlet } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { Store } from '@ngrx/store'; import { addPluginToVisited, selectPluginsVisitedPlugins } from 'src/app/state'; @@ -10,7 +11,7 @@ import { translates } from './../i18n/translates'; @Component({ selector: 'app-customers-pn-layout', template: ``, - standalone: false + imports: [RouterOutlet] }) export class CustomerPnLayoutComponent implements AfterContentInit, OnInit { private translateService = inject(TranslateService);