File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 58
58
</ mat-form-field >
59
59
60
60
< ll-schema-asset-select
61
- [space ] ="selectedSpace "
61
+ [spaceId ] ="spaceId "
62
62
[assetId] ="form.controls['previewImage'].value "
63
63
(assetChange) ="form.controls['previewImage'].setValue($event) " />
64
64
Original file line number Diff line number Diff line change 19
19
height ="200 "
20
20
alt ="thumbnail "
21
21
loading ="lazy "
22
- ngSrc ="/api/v1/spaces/{{ space?.id }}/assets/{{ asset.id }} " />
22
+ ngSrc ="/api/v1/spaces/{{ spaceId }}/assets/{{ asset.id }} " />
23
23
</ ng-container >
24
24
< ng-template #noImage >
25
25
< mat-icon > file_present</ mat-icon >
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import { AssetFileType } from '@shared/models/schema.model';
19
19
changeDetection : ChangeDetectionStrategy . OnPush ,
20
20
} )
21
21
export class AssetSelectComponent implements OnInit {
22
- @Input ( { required : true } ) space ?: Space ;
22
+ @Input ( { required : true } ) spaceId ! : string ;
23
23
@Input ( ) assetId ?: string ;
24
24
@Output ( ) assetChange = new EventEmitter < string | undefined > ( ) ;
25
25
asset ?: AssetFile ;
@@ -40,7 +40,7 @@ export class AssetSelectComponent implements OnInit {
40
40
41
41
loadData ( ) : void {
42
42
if ( this . assetId ) {
43
- this . assetService . findById ( this . space ! . id , this . assetId ) . subscribe ( {
43
+ this . assetService . findById ( this . spaceId , this . assetId ) . subscribe ( {
44
44
next : asset => {
45
45
if ( asset . kind === AssetKind . FILE ) {
46
46
this . asset = asset ;
@@ -59,7 +59,7 @@ export class AssetSelectComponent implements OnInit {
59
59
maxWidth : '1280px' ,
60
60
maxHeight : 'calc(100vh - 80px)' ,
61
61
data : {
62
- spaceId : this . space ! . id ,
62
+ spaceId : this . spaceId ,
63
63
multiple : false ,
64
64
fileType : AssetFileType . IMAGE ,
65
65
} ,
You can’t perform that action at this time.
0 commit comments