Skip to content

Commit 545bf14

Browse files
authored
Merge branch 'master' into 9906-surveys-ui-improvements
2 parents 142d16c + 4174624 commit 545bf14

5 files changed

Lines changed: 42 additions & 18 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"license": "AGPL-3.0",
44
"version": "0.22.90",
55
"myplanet": {
6-
"latest": "v0.55.45",
6+
"latest": "v0.55.91",
77
"min": "v0.53.91"
88
},
99
"scripts": {

src/app/manager-dashboard/reports/reports-detail.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ import {
4848
} from '@angular/material/table';
4949
import { ReportsDetailActivitiesComponent } from './reports-detail-activities.component';
5050

51-
type ChartModule = typeof import('chart.js');
52-
interface DateFilterForm {
51+
interface DateFilterForm {
5352
startDate: FormControl<Date>;
5453
endDate: FormControl<Date>;
5554
};

src/app/shared/forms/planet-tag-input.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,13 @@ export class PlanetTagInputComponent implements ControlValueAccessor, OnInit, On
218218
}
219219

220220
tagsInSelection(selectedIds: string[], data: FilteredDataItem[]): SelectedDialogTag[] {
221+
const dataMap = new Map<string, FilteredDataItem>();
222+
for (const item of data) {
223+
dataMap.set(item._id, item);
224+
}
221225
const selectedTagsObject = selectedIds
222226
.reduce<Record<string, number>>((selectedTags, id) => {
223-
const tags = data.find((item) => item._id === id)?.tags || [];
227+
const tags = dataMap.get(id)?.tags || [];
224228
tags.forEach((tag) => {
225229
selectedTags[tag._id] = selectedTags[tag._id] === undefined ? 1 : selectedTags[tag._id] + 1;
226230
});

src/app/users/users-update/users-update.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@
133133
</div>
134134
</form>
135135
</div>
136-
<div *ngIf="!submissionMode">
137-
<div style="text-align: center;">
136+
<div *ngIf="!submissionMode" class="profile-image-column">
137+
<div class="profile-image-content">
138138
<img *ngIf="showImagePreview" class="profile-image-update" [src]="previewSrc"><br>
139139
<div class="action-buttons">
140140
<button mat-raised-button color="secondary" (click)="fileInput.click()"><span i18n>Choose Image</span></button>

src/app/users/users-update/users-update.scss

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
@use '../../variables' as v;
22

3+
@mixin form-grid($columns) {
4+
display: grid;
5+
grid-template-columns: repeat($columns, minmax(0, 1fr));
6+
gap: 1rem;
7+
8+
mat-form-field {
9+
width: 100%;
10+
}
11+
}
12+
313
.view-container {
414
display: flex;
515
flex-wrap: wrap;
@@ -28,26 +38,17 @@
2838

2939
.profile-names {
3040
grid-area: form-names;
31-
32-
mat-form-field {
33-
margin-right: 1rem;
34-
}
41+
@include form-grid(3);
3542
}
3643

3744
.profile-contacts {
3845
grid-area: form-contacts;
39-
40-
mat-form-field {
41-
margin-right: 1rem;
42-
}
46+
@include form-grid(3);
4347
}
4448

4549
.profile-dropdowns {
4650
grid-area: form-dropdowns;
47-
48-
mat-form-field {
49-
margin-right: 1rem;
50-
}
51+
@include form-grid(2);
5152
}
5253

5354
.radio-group {
@@ -61,6 +62,16 @@
6162
justify-content: center;
6263
}
6364

65+
.profile-image-column {
66+
flex: 1;
67+
justify-content: center;
68+
padding: 1rem;
69+
}
70+
71+
.profile-image-content {
72+
text-align: center;
73+
}
74+
6475
.profile-image-section {
6576
display: grid;
6677
grid-template-columns: 1fr 2fr;
@@ -82,6 +93,10 @@
8293
}
8394

8495
@media (max-width: v.$screen-sm) {
96+
.profile-names, .profile-contacts, .profile-dropdowns, .radio-group {
97+
grid-template-columns: 1fr;
98+
}
99+
85100
.profile-image-section{
86101
display: flex;
87102
flex-direction: column;
@@ -91,3 +106,9 @@
91106
margin-top: 1rem;
92107
}
93108
}
109+
110+
@media (min-width: calc(#{v.$screen-sm} + 1px)) and (max-width: v.$screen-md) {
111+
.profile-names, .profile-contacts, .profile-dropdowns {
112+
grid-template-columns: repeat(2, minmax(0, 1fr));
113+
}
114+
}

0 commit comments

Comments
 (0)