Skip to content

Commit

Permalink
chore(concierge): tweak display for locker bookings
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYuion committed Jan 20, 2025
1 parent 5957ac7 commit 30eea8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions apps/concierge/src/app/lockers/locker-bookings.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ import { SettingsService } from '@placeos/common';
"
>
<div class="p-2">
<ng-container *ngIf="!row.all_day">
<ng-container
*ngIf="!(row.all_day || row.duration > 12 * 60)"
>
{{ row.date | date: time_format }} &ndash;
{{ row.date_end | date: time_format }}
</ng-container>
<ng-container *ngIf="row.all_day">
<ng-container
*ngIf="row.all_day || row.duration > 12 * 60"
>
{{ 'COMMON.ALL_DAY' | translate }}
</ng-container>
</div>
Expand Down Expand Up @@ -267,7 +271,7 @@ import { SettingsService } from '@placeos/common';
}
`,
],
standalone: false
standalone: false,
})
export class LockerBookingsComponent {
public loading: string;
Expand Down
4 changes: 2 additions & 2 deletions apps/concierge/src/app/lockers/locker-state.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,14 @@ export class LockerStateService extends AsyncHandler {
locker.assigned_to !== new_locker.assigned_to &&
new_locker.assigned_to
) {
const date = set(Date.now(), { hours: 4, minutes: 0, seconds: 0 });
const date = set(Date.now(), { hours: 2, minutes: 0, seconds: 0 });
await saveBooking(
new Booking({
user_id: new_locker.assigned_to,
user_email: new_locker.assigned_to,
user_name: new_locker?.assigned_name,
booking_start: getUnixTime(date),
booking_end: getUnixTime(addHours(date, 16)),
booking_end: getUnixTime(addHours(date, 20)),
type: 'locker',
booking_type: 'locker',
asset_id: new_locker.id,
Expand Down

0 comments on commit 30eea8a

Please sign in to comment.