Skip to content

Commit ca12fcc

Browse files
Merge branch 'beta' of github.com-relief:ReliefApplications/ems-frontend into feat/AB#80878_limit-zoom-of-map-widgets-for-the-given-geographic-context-in-the-page
2 parents c671f45 + ba4af8c commit ca12fcc

File tree

98 files changed

+1571
-439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1571
-439
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
{
5050
"exemptEmptyConstructors": false,
5151
"contexts": [
52+
"PropertyDefinition",
5253
"ExportDefaultDeclaration > ArrowFunctionExpression",
5354
"TSInterfaceDeclaration",
5455
"TSEnumDeclaration",
@@ -95,4 +96,4 @@
9596
"rules": {}
9697
}
9798
]
98-
}
99+
}

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## [2.2.2](https://github.com/ReliefApplications/ems-frontend/compare/v2.2.1...v2.2.2) (2023-12-13)
2+
3+
4+
### Bug Fixes
5+
6+
* non readable message when failing to load application's style ([06c692a](https://github.com/ReliefApplications/ems-frontend/commit/06c692a39c4475067866bb4eb88147de3d207202))
7+
8+
## [2.2.1](https://github.com/ReliefApplications/ems-frontend/compare/v2.2.0...v2.2.1) (2023-12-12)
9+
10+
11+
### Bug Fixes
12+
13+
* incorrect position of dashboard filter in front-office ([6dc6184](https://github.com/ReliefApplications/ems-frontend/commit/6dc61841a6a69dddd30abc91d62c45e8849c6cc1))
14+
* layout & aggregation not appearing in grid widget when adding them ([66f7dc1](https://github.com/ReliefApplications/ems-frontend/commit/66f7dc1e57d56928f685660f108a1e79a1a5a7d1))
15+
* profile page not working in front-office ([#2150](https://github.com/ReliefApplications/ems-frontend/issues/2150)) ([fe5bad3](https://github.com/ReliefApplications/ems-frontend/commit/fe5bad366908a5ab1fd5562a7bf0c922787b73d6))
16+
* put Accept headers in graphql module instead of auth-interceptor ([4ba7456](https://github.com/ReliefApplications/ems-frontend/commit/4ba74563471b2a0c5808e7f0719df595dd383f5d))
17+
* setting sort fields in summary cards would refresh the modal ([#2156](https://github.com/ReliefApplications/ems-frontend/issues/2156)) ([539017b](https://github.com/ReliefApplications/ems-frontend/commit/539017bca5d93214dfdeb02360e3b74a58954f75))
18+
119
# [2.2.0](https://github.com/ReliefApplications/ems-frontend/compare/v2.1.8...v2.2.0) (2023-12-08)
220

321

CHANGELOG/CHANGELOG_beta.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# [2.3.0-beta.2](https://github.com/ReliefApplications/ems-frontend/compare/v2.3.0-beta.1...v2.3.0-beta.2) (2023-12-11)
2+
3+
4+
### Bug Fixes
5+
6+
* put Accept headers in graphql module instead of auth-interceptor ([4ba7456](https://github.com/ReliefApplications/ems-frontend/commit/4ba74563471b2a0c5808e7f0719df595dd383f5d))
7+
8+
9+
### Features
10+
11+
* allow reference data to be used in charts ([#2148](https://github.com/ReliefApplications/ems-frontend/issues/2148)) ([6adf1d1](https://github.com/ReliefApplications/ems-frontend/commit/6adf1d1a6e2f88e92a61576f8b7db007be6ff49d)), closes [#68346](https://github.com/ReliefApplications/ems-frontend/issues/68346) [#68346](https://github.com/ReliefApplications/ems-frontend/issues/68346) [#68346](https://github.com/ReliefApplications/ems-frontend/issues/68346) [#68346](https://github.com/ReliefApplications/ems-frontend/issues/68346) [#68346](https://github.com/ReliefApplications/ems-frontend/issues/68346) [#68346](https://github.com/ReliefApplications/ems-frontend/issues/68346)
12+
13+
# [2.3.0-beta.1](https://github.com/ReliefApplications/ems-frontend/compare/v2.2.0...v2.3.0-beta.1) (2023-12-09)
14+
15+
16+
### Features
17+
18+
* allow text & summary card widgets to use record edition when using resource & layout ([#2134](https://github.com/ReliefApplications/ems-frontend/issues/2134)) ([a0f0ca0](https://github.com/ReliefApplications/ems-frontend/commit/a0f0ca0be44bb0c4e908d8317f08abe835592ff8))
19+
120
# [2.2.0-beta.16](https://github.com/ReliefApplications/ems-frontend/compare/v2.2.0-beta.15...v2.2.0-beta.16) (2023-12-08)
221

322

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
OORT Front-end
22
=======
3-
[![Github Pages](https://github.com/ReliefApplications/oort-frontend/actions/workflows/github-pages.yml/badge.svg)](https://github.com/ReliefApplications/oort-frontend/actions/workflows/github-pages.yml)
4-
[![Storybook](https://github.com/ReliefApplications/oort-frontend/actions/workflows/storybook.yml/badge.svg)](https://github.com/ReliefApplications/oort-frontend/actions/workflows/storybook.yml)
3+
[![Github Pages](https://github.com/ReliefApplications/ems-frontend/actions/workflows/github-pages.yml/badge.svg)](https://github.com/ReliefApplications/ems-frontend/actions/workflows/github-pages.yml)
4+
[![Storybook](https://github.com/ReliefApplications/ems-frontend/actions/workflows/storybook.yml/badge.svg)](https://github.com/ReliefApplications/ems-frontend/actions/workflows/storybook.yml)
55

66
# Versions
77

88
Branch | Version | CI
99
--- | --- | ---
10-
main | ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/ReliefApplications/oort-frontend/main) | [![Version](https://github.com/ReliefApplications/oort-frontend/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ReliefApplications/oort-frontend/actions/workflows/ci.yml)
11-
next | ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/ReliefApplications/oort-frontend/next?color=6ded5a) | [![Version](https://github.com/ReliefApplications/oort-frontend/actions/workflows/ci.yml/badge.svg?branch=next)](https://github.com/ReliefApplications/oort-frontend/actions/workflows/ci.yml)
12-
beta | ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/ReliefApplications/oort-frontend/beta?color=ecf495) | [![Version](https://github.com/ReliefApplications/oort-frontend/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/ReliefApplications/oort-frontend/actions/workflows/ci.yml)
10+
main | ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/ReliefApplications/ems-frontend/main) | [![Version](https://github.com/ReliefApplications/ems-frontend/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ReliefApplications/ems-frontend/actions/workflows/ci.yml)
11+
next | ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/ReliefApplications/ems-frontend/next?color=6ded5a) | [![Version](https://github.com/ReliefApplications/ems-frontend/actions/workflows/ci.yml/badge.svg?branch=next)](https://github.com/ReliefApplications/ems-frontend/actions/workflows/ci.yml)
12+
beta | ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/ReliefApplications/ems-frontend/beta?color=ecf495) | [![Version](https://github.com/ReliefApplications/ems-frontend/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/ReliefApplications/ems-frontend/actions/workflows/ci.yml)
1313

1414
# Introduction
1515

apps/back-office/src/app/dashboard/pages/resource/aggregations-tab/aggregations-tab.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class AggregationsTabComponent
169169
dialogRef.closed.pipe(takeUntil(this.destroy$)).subscribe((value: any) => {
170170
if (value) {
171171
this.aggregationService
172-
.addAggregation(value, this.resource.id)
172+
.addAggregation(value, { resource: this.resource.id })
173173
.subscribe(({ data }: any) => {
174174
if (data.addAggregation) {
175175
this.aggregations = [...this.aggregations, data?.addAggregation];
@@ -199,7 +199,7 @@ export class AggregationsTabComponent
199199
dialogRef.closed.pipe(takeUntil(this.destroy$)).subscribe((value: any) => {
200200
if (value) {
201201
this.aggregationService
202-
.editAggregation(aggregation, value, this.resource.id)
202+
.editAggregation(aggregation, value, { resource: this.resource.id })
203203
.subscribe(({ data }: any) => {
204204
if (data.editAggregation) {
205205
this.aggregations = this.aggregations.map((x: any) => {
@@ -236,7 +236,7 @@ export class AggregationsTabComponent
236236
dialogRef.closed.pipe(takeUntil(this.destroy$)).subscribe((value: any) => {
237237
if (value) {
238238
this.aggregationService
239-
.deleteAggregation(aggregation, this.resource.id)
239+
.deleteAggregation(aggregation, { resource: this.resource.id })
240240
.subscribe(({ data }: any) => {
241241
if (data.deleteAggregation) {
242242
this.aggregations = this.aggregations.filter(

apps/back-office/src/app/graphql.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const createApollo = (httpLink: HttpLink): ApolloClientOptions<any> => {
2525
const basic = setContext(() => ({
2626
headers: {
2727
// eslint-disable-next-line @typescript-eslint/naming-convention
28-
Accept: 'charset=utf-8',
28+
Accept: 'application/json; charset=utf-8',
2929
UserTimeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
3030
},
3131
}));

apps/front-office/src/app/application/application.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[leftSidenav]="pages"
1212
[sideMenu]="sideMenu"
1313
[menuOpened]="!hideMenu"
14-
[profileRoute]="'/' + appID + '/profile'"
14+
[profileRoute]="appID ? '/' + appID + '/profile' : '/profile'"
1515
(openApplication)="onOpenApplication($event)"
1616
></shared-layout>
1717
<!--Need the nav variable, don't remove let-nav, used in layout-->

apps/front-office/src/app/application/application.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export class ApplicationComponent
9393
this.route.params.pipe(takeUntil(this.destroy$)).subscribe((params) => {
9494
this.loading = true;
9595
this.applicationService.loadApplication(params.id);
96+
this.appID = params.id;
9697
});
9798
// Get list of available applications
9899
this.authService.user$

apps/front-office/src/app/application/pages/dashboard/dashboard.component.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1+
<shared-dashboard-filter
2+
*ngIf="showFilter && !isFullScreen"
3+
[isFullScreen]="isFullScreen"
4+
[variant]="variant"
5+
[closable]="closable"
6+
></shared-dashboard-filter>
17
<!-- We use a div so we can have a standard background when seeing the dashboard on fullscreen -->
28
<div [ngClass]="{ 'py-8 px-6 h-full bg-white overflow-auto': isFullScreen }">
9+
<shared-dashboard-filter
10+
*ngIf="showFilter && isFullScreen"
11+
[isFullScreen]="isFullScreen"
12+
[variant]="variant"
13+
[closable]="closable"
14+
></shared-dashboard-filter>
315
<ng-container
416
sharedFullScreen
517
[(isFullScreenMode)]="isFullScreen"
@@ -11,12 +23,12 @@
1123
shape: 'rectangle'
1224
"
1325
>
14-
<ng-container *ngIf="dashboard && (showName || buttonActions.length > 0)">
26+
<ng-container *ngIf="dashboard">
1527
<div
1628
id="dashboard-header"
1729
class="flex flex-wrap items-center mb-6 gap-4 justify-between"
1830
>
19-
<ng-container *ngIf="showName">
31+
<ng-container>
2032
<h1 class="!m-0 overflow-hidden text-ellipsis">
2133
{{ dashboard.name }}
2234
</h1>
@@ -49,16 +61,4 @@ <h1 class="!m-0 overflow-hidden text-ellipsis">
4961
[options]="dashboard?.gridOptions"
5062
(changeStep)="changeStep.emit($event)"
5163
></shared-widget-grid>
52-
<shared-dashboard-filter
53-
*ngIf="showFilter && isFullScreen"
54-
[isFullScreen]="isFullScreen"
55-
[variant]="variant"
56-
[closable]="closable"
57-
></shared-dashboard-filter>
5864
</div>
59-
<shared-dashboard-filter
60-
*ngIf="showFilter && !isFullScreen"
61-
[isFullScreen]="isFullScreen"
62-
[variant]="variant"
63-
[closable]="closable"
64-
></shared-dashboard-filter>

apps/front-office/src/app/application/pages/dashboard/dashboard.component.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,11 @@ export class DashboardComponent
6161
public dashboard?: Dashboard;
6262
/** Show dashboard filter */
6363
public showFilter!: boolean;
64-
/** Show name ( contextual pages ) */
65-
public showName = false;
6664
/** Current style variant */
6765
public variant!: string;
6866
/** hide / show the close icon on the right */
6967
public closable = true;
70-
71-
// === BUTTON ACTIONS ===
68+
/** Dashboard button actions */
7269
public buttonActions: ButtonActionT[] = [];
7370

7471
/** @returns type of context element */
@@ -138,7 +135,6 @@ export class DashboardComponent
138135
if (id) {
139136
if (queryId) {
140137
// Try to load template
141-
this.showName = true;
142138
this.loadDashboard(id).then(() => {
143139
const templates = this.dashboard?.page?.contentWithContext;
144140
const type = this.contextType;
@@ -176,7 +172,6 @@ export class DashboardComponent
176172
});
177173
} else {
178174
// Don't use template, and directly load the dashboard from router's params
179-
this.showName = false;
180175
this.loadDashboard(id).then(() => (this.loading = false));
181176
}
182177
}

0 commit comments

Comments
 (0)