Skip to content

Commit

Permalink
Merge branch 'release/V4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremieFR committed Jan 22, 2025
2 parents f813ba2 + ab523a0 commit 6028f22
Show file tree
Hide file tree
Showing 188 changed files with 8,262 additions and 5,416 deletions.
9,747 changes: 5,903 additions & 3,844 deletions Angular/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@
"@angular/compiler-cli": "~17.3.12",
"@angular/language-service": "~17.3.12",
"@ngrx/store-devtools": "~17.2.0",
"@types/node": "~20.17.10",
"@types/node": "~20.17.14",
"@types/papaparse": "~5.3.15",
"@typescript-eslint/eslint-plugin": "~5.62.0",
"@typescript-eslint/parser": "~5.62.0",
"eslint": "~8.57.1",
"eslint-config-prettier": "~9.1.0",
"eslint-plugin-deprecation": "~3.0.0",
"eslint-plugin-prettier": "~5.2.1",
"eslint-plugin-prettier": "~5.2.3",
"prettier": "~3.4.2",
"prettier-eslint": "~16.3.0",
"prettier-plugin-organize-imports": "~4.1.0",
Expand Down
10 changes: 7 additions & 3 deletions Angular/src/app/core/bia-core/services/bia-message.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class BiaMessageService {

showErrorHttpResponse(err: HttpErrorResponse) {
if (err.status == HttpStatusCode.UnprocessableEntity) {
this.showErrorDetail(err.error, undefined);
this.showErrorDetail(err.error);
} else {
this.showError();
}
Expand Down Expand Up @@ -93,15 +93,19 @@ export class BiaMessageService {
});
}

showErrorDetail(detailValue: string, life = undefined) {
showErrorDetail(
detailValue: string,
sticky = true,
life: number = MESSAGE_LIFE_DEFAULT * 2
) {
const summaryValue = this.translateService.instant('bia.error');
this.messageService.add({
key: 'bia',
severity: 'error',
summary: summaryValue,
detail: detailValue,
life: life,
sticky: true,
sticky: sticky,
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface TokenConf {
}

export interface ProfileConfiguration {
urlProfileImage: string;
urlEditProfileImage: string;
clientProfileImageGetMode: boolean;
profileImageUrlOrPath: string;
editProfileImageUrl: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
*ngIf="canEdit"
class="p-button-outlined"
label="{{ 'maintenanceTeam.edit' | translate }}"
(click)="onEdit(selectedCrudItems[0].id)"></button>
(click)="onEdit(selectedCrudItems[0].id)"
pTooltip="{{ 'maintenanceTeam.edit' | translate }}"
tooltipPosition="top"></button>
<button
pButton
[disabled]="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
*ngIf="canEdit"
class="p-button-outlined"
label="{{ 'aircraftMaintenanceCompany.edit' | translate }}"
(click)="onEdit(selectedCrudItems[0].id)"></button>
(click)="onEdit(selectedCrudItems[0].id)"
pTooltip="{{ 'aircraftMaintenanceCompany.edit' | translate }}"
tooltipPosition="top"></button>
<!-- // Begin Child MaintenanceTeam -->
<button
pButton
Expand All @@ -42,7 +44,11 @@
label="{{
'aircraftMaintenanceCompany.maintenanceTeams' | translate
}}"
(click)="onViewMaintenanceTeams()"></button>
(click)="onViewMaintenanceTeams()"
pTooltip="{{
'aircraftMaintenanceCompany.maintenanceTeams' | translate
}}"
tooltipPosition="top"></button>
<button
pButton
[disabled]="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<button
pButton
type="button"
icon="pi pi-plus"
label="{{ 'bia.translation.addAll' | translate }}"
(click)="addAllTranslation()"
[disabled]="!missingTranslation"></button>
Expand Down Expand Up @@ -99,6 +100,7 @@
<button
pButton
type="button"
icon="pi pi-trash"
label="{{ 'bia.translation.delete' | translate }}"
(click)="removeTranslation(i)"></button>
</div>
Expand Down Expand Up @@ -135,6 +137,7 @@
class="ui-button-secondary"
pButton
type="button"
icon="pi pi-plus"
label="{{ 'bia.translation.add' | translate }}"
(click)="addTranslation()"
[disabled]="!selectionLanguage"></button>
Expand Down Expand Up @@ -297,14 +300,16 @@
<div class="flex flex-row gap-1 justify-content-end">
<button
pButton
label="{{ 'bia.save' | translate }}"
type="submit"
[disabled]="!form.valid"></button>
<button
pButton
icon="pi pi-times"
label="{{ 'bia.cancel' | translate }}"
type="button"
class="p-button-outlined"
(click)="onCancel()"></button>
<button
pButton
icon="pi pi-check"
label="{{ 'bia.save' | translate }}"
type="submit"
[disabled]="!form.valid"></button>
</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
[notification]="notification"></bia-notification-team-warning>
<button
pButton
[label]="notification.data.display | translate"
icon="pi pi-times"
label="{{ 'bia.cancel' | translate }}"
type="button"
class="p-button-primary"
(click)="onAction(notification)"
*ngIf="canAction(notification)"></button>
class="p-button-secondary"
(click)="onCancelled()"></button>
<button
pButton
label="{{ 'bia.edit' | translate }}"
Expand All @@ -48,10 +48,11 @@
*ngIf="canEdit"></button>
<button
pButton
label="{{ 'bia.cancel' | translate }}"
[label]="notification.data.display | translate"
type="button"
class="p-button-secondary"
(click)="onCancelled()"></button>
class="p-button-primary"
(click)="onAction(notification)"
*ngIf="canAction(notification)"></button>
</div>
</div>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,12 @@ export class NotificationsIndexComponent implements OnInit, OnDestroy {
type: PropType.OneToMany,
}),
Object.assign(new BiaFieldConfig('read', 'notification.read'), {
isSearchable: false,
type: PropType.Boolean,
}),
Object.assign(
new BiaFieldConfig('createdDate', 'notification.createdDate'),
{
type: PropType.Date,
type: PropType.DateTime,
}
),
Object.assign(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@
<div class="flex flex-row gap-1 justify-content-end">
<button
pButton
label="{{ 'bia.save' | translate }}"
type="submit"
[disabled]="!form.valid"></button>
<button
pButton
icon="pi pi-times"
label="{{ 'bia.cancel' | translate }}"
type="button"
class="p-button-outlined"
(click)="onCancel()"></button>
<button
pButton
icon="pi pi-plus"
label="{{ 'bia.add' | translate }}"
type="submit"
[disabled]="!form.valid"></button>
</div>
</form>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p-dialog
[focusOnShow]="false"
[focusOnShow]="true"
[(visible)]="_display"
[modal]="true"
[closable]="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const userCRUDConfiguration: CrudConfig<User> = new CrudConfig({
// useViewTeamWithTypeId: TeamTypeId.Site, // use to filter view by teams => should know the type of team
usePopup: true,
useOfflineMode: false,
bulkMode: {
importMode: {
useInsert: true,
useUpdate: true,
useDelete: false,
Expand Down
12 changes: 6 additions & 6 deletions Angular/src/app/features/bia-features/users/user.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { PermissionGuard } from 'src/app/core/bia-core/guards/permission.guard';
import { RoleOptionModule } from 'src/app/domains/bia-domains/role-option/role-option.module';
import { FullPageLayoutComponent } from 'src/app/shared/bia-shared/components/layout/fullpage-layout/fullpage-layout.component';
import { PopupLayoutComponent } from 'src/app/shared/bia-shared/components/layout/popup-layout/popup-layout.component';
import { CrudItemBulkModule } from 'src/app/shared/bia-shared/feature-templates/crud-items/crud-item-bulk.module';
import { CrudItemImportModule } from 'src/app/shared/bia-shared/feature-templates/crud-items/crud-item-import.module';
import { CrudItemModule } from 'src/app/shared/bia-shared/feature-templates/crud-items/crud-item.module';
import { Permission } from 'src/app/shared/permission';
import { SharedModule } from 'src/app/shared/shared.module';
Expand All @@ -17,8 +17,8 @@ import { UserTableComponent } from './components/user-table/user-table.component
import { FeatureUsersStore } from './store/user.state';
import { UsersEffects } from './store/users-effects';
import { userCRUDConfiguration } from './user.constants';
import { UserBulkComponent } from './views/user-bulk/user-bulk.component';
import { UserEditComponent } from './views/user-edit/user-edit.component';
import { UserImportComponent } from './views/user-import/user-import.component';
import { UserItemComponent } from './views/user-item/user-item.component';
import { UserNewComponent } from './views/user-new/user-new.component';
import { UsersIndexComponent } from './views/users-index/users-index.component';
Expand All @@ -36,7 +36,7 @@ export const ROUTES: Routes = [
// [Calc] : The children are not used in calc
children: [
{
path: 'bulk',
path: 'import',
data: {
breadcrumb: 'user.import',
canNavigate: false,
Expand All @@ -47,7 +47,7 @@ export const ROUTES: Routes = [
},
permission: Permission.User_Save,
title: 'user.import',
injectComponent: UserBulkComponent,
injectComponent: UserImportComponent,
dynamicComponent: () =>
userCRUDConfiguration.usePopup
? PopupLayoutComponent
Expand Down Expand Up @@ -126,12 +126,12 @@ export const ROUTES: Routes = [
UserEditComponent,
// [Calc] : Used only for calc it is possible to delete unsed commponent files (components/...-table)).
UserTableComponent,
UserBulkComponent,
UserImportComponent,
],
imports: [
SharedModule,
CrudItemModule,
CrudItemBulkModule,
CrudItemImportModule,
RouterModule.forChild(ROUTES),
StoreModule.forFeature(
userCRUDConfiguration.storeKey,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Component, Injector } from '@angular/core';
import { CrudItemBulkComponent } from 'src/app/shared/bia-shared/feature-templates/crud-items/views/crud-item-bulk/crud-item-bulk.component';
import { CrudItemImportComponent } from 'src/app/shared/bia-shared/feature-templates/crud-items/views/crud-item-import/crud-item-import.component';
import { Permission } from 'src/app/shared/permission';
import { User } from '../../model/user';
import { UserService } from '../../services/user.service';
import { userCRUDConfiguration } from '../../user.constants';

@Component({
selector: 'bia-user-bulk',
selector: 'bia-user-import',
templateUrl:
'../../../../../shared/bia-shared/feature-templates/crud-items/views/crud-item-bulk/crud-item-bulk.component.html',
'../../../../../shared/bia-shared/feature-templates/crud-items/views/crud-item-import/crud-item-import.component.html',
})
export class UserBulkComponent extends CrudItemBulkComponent<User> {
export class UserImportComponent extends CrudItemImportComponent<User> {
constructor(
protected injector: Injector,
protected userService: UserService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<bia-user-form
[isAdd]="true"
[fields]="crudConfiguration.fieldsConfig.columns"
[dictOptionDtos]="(userService.optionsService.dictOptionDtos$ | async) ?? []"
(cancel)="onCancelled()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
[canAdd]="canAdd"
[canDelete]="canDelete"
[canEdit]="canEdit"
[canBulk]="canSave && crudConfiguration.useBulk"
[canImport]="canSave && crudConfiguration.useImport"
[canExportCSV]="true"
(create)="onCreate()"
(exportCSV)="onExportCSV('user.listOf')"
(fullExportCSV)="onExportCSV('user.listOf', true)"
(delete)="onDelete()"
(bulk)="onBulk()"
(import)="onImport()"
[selectedElements]="selectedCrudItems"
[showTableControllerButton]="crudConfiguration.useCompactMode ?? false"
[tableControllerVisible]="showTableController"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ <h1>Launch random review plane in hanfire job.</h1>
pButton
type="button"
(click)="randomReviewPlane(team.id)"
label="{{ team.title }}"></button>
label="{{ team.title }}"
pTooltip="{{ team.title }}"
tooltipPosition="top"></button>
</ng-container>
</div>
<BR />
Expand All @@ -41,7 +43,9 @@ <h1>Launch random review plane in hanfire job.</h1>
pButton
type="button"
(click)="randomReviewPlane(team.id)"
label="{{ team.title }}"></button>
label="{{ team.title }}"
pTooltip="{{ team.title }}"
tooltipPosition="top"></button>
</ng-container>
</div>
<BR />
Expand All @@ -60,6 +64,8 @@ <h1>Launch random review plane in hanfire job.</h1>
pButton
type="button"
(click)="randomReviewPlane(team.id)"
label="{{ team.parentTeamTitle }} > {{ team.title }}"></button>
label="{{ team.parentTeamTitle }} > {{ team.title }}"
pTooltip="{{ team.parentTeamTitle }} > {{ team.title }}"
tooltipPosition="top"></button>
</ng-container>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ button {
}

.header {
margin-bottom: 15px;
margin-top: 15px;
margin-bottom: 1rem;
margin-top: 1rem;
h1 {
font-family: 'raleway-thin', serif;
font-size: 36px;
font-size: 1.75rem;
font-weight: 200;
margin: 0px;
line-height: 24px;
line-height: 1.75rem;
}
}
3 changes: 1 addition & 2 deletions Angular/src/app/features/home/home-index.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
// }
// }
h1 {
font-family: 'raleway-thin', serif;
font-size: 36px;
font-size: 1.75rem;
font-weight: 200;
}
h1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,16 @@
<div class="flex flex-row gap-1 justify-content-end">
<button
pButton
label="{{ 'bia.save' | translate }}"
type="submit"
[disabled]="!form.valid"></button>
<button
pButton
icon="pi pi-times"
label="{{ 'bia.cancel' | translate }}"
type="button"
class="p-button-outlined"
(click)="onCancel()"></button>
<button
pButton
icon="pi pi-check"
label="{{ 'bia.save' | translate }}"
type="submit"
[disabled]="!form.valid"></button>
</div>
</form>
Loading

0 comments on commit 6028f22

Please sign in to comment.