Skip to content

Commit e2fdbc4

Browse files
committed
hide map if there is no location
hide map if there is no location
1 parent 1626124 commit e2fdbc4

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

src/app/file-browser/components/file-viewer/file-viewer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
<td class="location-container" (click)="onLocationClick()">
167167
<pr-static-map
168168
[location]="currentRecord.LocnVO || currentRecord.location"
169-
*ngIf="currentRecord.location || currentRecord.LocnVO"
169+
*ngIf="currentRecord.location?.id || currentRecord.LocnVO"
170170
></pr-static-map>
171171
<span *ngIf="currentRecord.location || currentRecord.LocnVO">{{
172172
(currentRecord.location || currentRecord.LocnVO | prLocation)

src/app/file-browser/components/sidebar/sidebar.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
[class.can-edit]="canEdit"
166166
>
167167
<pr-static-map
168+
*ngIf="selectedItem.location?.id || selectedItem.LocnVO"
168169
[location]="selectedItem.LocnVO || selectedItem.location"
169170
></pr-static-map>
170171
</div>

src/app/models/locn-vo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { BaseVOData } from '@models/base-vo';
33
export interface LocnVOData extends BaseVOData {
44
locnId?: number;
55
timeZoneId?: number;
6+
id?: string;
67

78
displayName?: string;
89
geoCodeLookup?: string;

src/app/shared/pipes/pr-location.pipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class PrLocationPipe implements PipeTransform {
1515
constructor() {}
1616

1717
transform(locnVO: LocnVOData): LocnPipeOutput {
18-
if (!locnVO) {
18+
if (!locnVO || !locnVO?.id) {
1919
return null;
2020
}
2121

0 commit comments

Comments
 (0)