@@ -163,10 +163,9 @@ import { DeskSettingsModalComponent } from './desk-settings-modal.component';
163163 <div>{{ period() }}</div>
164164 </div>
165165 <div class="flex items-center space-x-2 px-2">
166- <icon
167- matTooltip="Level and Resource"
168- >{{ is_visitor() ? 'person' : 'map' }}</icon
169- >
166+ <icon matTooltip="Level and Resource">{{
167+ is_visitor() ? 'person' : 'map'
168+ }}</icon>
170169 <div>
171170 @if (is_visitor()) {
172171 <div>{{ visitor_display_name() }}</div>
@@ -480,10 +479,17 @@ export class BookingDetailsModalComponent {
480479 const is_visitor = this . booking ( ) . booking_type === 'visitor' ;
481480 const visitor_edit_allowed =
482481 is_visitor && settingSignal ( 'visitors.allow_editing' , false ) ( ) ;
482+ const is_parking = this . booking ( ) . booking_type === 'parking' ;
483+ const features : string [ ] = settingSignal < string [ ] > ( 'features' , [ ] ) ( ) ;
484+ const parking_allocated_edit_blocked =
485+ is_parking &&
486+ ! ! this . booking ( ) . asset_id &&
487+ ! features . includes ( 'parking' ) ;
483488 return (
484489 ! this . booking ( ) . is_done &&
485490 ! this . booking ( ) . checked_in &&
486- ( ! is_visitor || visitor_edit_allowed )
491+ ( ! is_visitor || visitor_edit_allowed ) &&
492+ ! parking_allocated_edit_blocked
487493 ) ;
488494 } ) ;
489495
@@ -679,7 +685,8 @@ export class BookingDetailsModalComponent {
679685 if ( group_member_name ) return group_member_name ;
680686 const attendee_name = this . _visitorAttendeeName ( booking ) ;
681687 if ( attendee_name ) return attendee_name ;
682- const asset_name = `${ booking . extension_data ?. visitor_name || booking . asset_name || '' } ` . trim ( ) ;
688+ const asset_name =
689+ `${ booking . extension_data ?. visitor_name || booking . asset_name || '' } ` . trim ( ) ;
683690 const reason_values = [
684691 `${ booking . title || '' } ` . trim ( ) . toLowerCase ( ) ,
685692 `${ booking . description || '' } ` . trim ( ) . toLowerCase ( ) ,
@@ -704,8 +711,9 @@ export class BookingDetailsModalComponent {
704711
705712 private _visitorAttendeeName ( booking : Booking ) {
706713 const attendee =
707- ( booking . attendees || [ ] ) . find ( ( item ) => item ?. email === booking . asset_id ) ||
708- booking . attendees ?. [ 0 ] ;
714+ ( booking . attendees || [ ] ) . find (
715+ ( item ) => item ?. email === booking . asset_id ,
716+ ) || booking . attendees ?. [ 0 ] ;
709717 const name = `${ attendee ?. name || '' } ` . trim ( ) ;
710718 return name || '' ;
711719 }
0 commit comments