Skip to content

Commit 70d6200

Browse files
committed
fix(adddata): missing layman access rights import
1 parent 023b9a7 commit 70d6200

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

projects/hslayers/components/add-data/common/common.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import {EpsgPipe, FilterPipe} from 'hslayers-ng/common/pipes';
88
import {HsAddLayerAuthorizedComponent} from './add-layer-authorized/add-layer-authorized.component';
99
import {HsAddToMapButtonComponent} from 'hslayers-ng/common/add-to-map';
1010
import {HsAdvancedOptionsComponent} from './advanced-options/advanced-options.component';
11-
import {HsLaymanCurrentUserComponent} from 'hslayers-ng/common/layman';
11+
import {
12+
HsCommonLaymanAccessRightsComponent,
13+
HsLaymanCurrentUserComponent,
14+
} from 'hslayers-ng/common/layman';
1215
import {HsNewLayerFormComponent} from './new-layer-form/new-layer-form.component';
1316
import {HsPositionComponent} from './target-position/target-position.component';
1417
import {HsSaveToLaymanComponent} from './save-to-layman/save-to-layman.component';
@@ -24,6 +27,7 @@ import {HsSaveToLaymanComponent} from './save-to-layman/save-to-layman.component
2427
HsAddToMapButtonComponent,
2528
EpsgPipe,
2629
FilterPipe,
30+
HsCommonLaymanAccessRightsComponent,
2731
],
2832
exports: [
2933
HsAdvancedOptionsComponent,

projects/hslayers/components/add-data/common/new-layer-form/new-layer-form.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<select class="form-select rounded-0" id="hs-add-data-crs" [(ngModel)]="data.srs" name="srs"
2020
[ngClass]="data?.srs ? 'is-valid mb-2' : 'is-invalid'" aria-label="CRS floating label select">
2121
@for (epsg of hsLaymanService.supportedCRRList(); track epsg) {
22-
<option [ngValue]="epsg">{{epsg | epsg}}
23-
}
22+
<option [ngValue]="epsg">{{epsg | epsg}}
23+
}
2424
</select>
2525
<label for="hs-add-data-crs">{{'ADDLAYERS.srs' | translate }}</label>
2626
</div>
@@ -29,8 +29,7 @@
2929
<p [hidden]="data?.srs"><sub class="text-danger">{{'ADDLAYERS.Vector.note' | translate }}</sub></p>
3030

3131
@if (hsAddDataCommonFileService.isAuthenticated() && data.saveAvailable) {
32-
<!-- TODO: Remove function call from template -->
33-
<hs-save-to-layman [data]="data"></hs-save-to-layman>
32+
<hs-save-to-layman [data]="data" />
3433
}
3534
@if (data.type === 'shp' || data.type.includes('raster') || data.type === 'geojson') {
3635
<div class="d-flex justify-content-between align-items-center">
@@ -40,7 +39,8 @@
4039
(change)="read({fileList: $event.target.files, uploader: 'style', dropped: false})" id="style">
4140
<label for="style" class="p-2 rounded" style="font-size: 1em;"
4241
[ngClass]="data.serializedStyle ? 'bg-success' : 'bg-primary'">
43-
<i class="fa-solid fa-cloud-arrow-up p-2"></i>{{data.serializedStyle?.name ?? allowedStyles.title |translate}}</label>
42+
<i class="fa-solid fa-cloud-arrow-up p-2"></i>{{data.serializedStyle?.name ?? allowedStyles.title
43+
|translate}}</label>
4444
</label>
4545
</div>
4646
}
@@ -51,4 +51,4 @@
5151
</button>
5252
@if (advancedPanelVisible) {
5353
<hs-advanced-options [data]="data"></hs-advanced-options>
54-
}
54+
}

projects/hslayers/components/add-data/common/save-to-layman/save-to-layman.component.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
save to layman
12
@if (data.type !== 'shp' && !data.type.includes('raster') ) {
23
<div class="d-flex flex-row justify-content-between align-items-baseline mb-1 ps-4">
34
<div>
@@ -22,9 +23,6 @@
2223
{{'ADDDATA.saveToDbExplanation' | translate }}
2324
</div>
2425
}
25-
<div class="ps-4 mt-3">
26-
@if (data.saveToLayman) {
27-
<hs-layman-access-rights [(access_rights)]="data.access_rights">
28-
</hs-layman-access-rights>
29-
}
30-
</div>
26+
@if (data.saveToLayman) {
27+
<hs-layman-access-rights [(access_rights)]="data.access_rights" class="ps-4 mt-3 d-block" />
28+
}

0 commit comments

Comments
 (0)