Skip to content

Commit

Permalink
Merge pull request #64 from ranggaadithia/finish_view
Browse files Browse the repository at this point in the history
fix languages & same start & end time booking
  • Loading branch information
ranggaadithia authored Nov 20, 2023
2 parents 99dcc47 + 9cbaf06 commit 0b17bad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions app/Livewire/ModalBooking.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public function mount($labs, $user, $timeMappings)
];

protected $messages = [
'lab_id.required' => 'Please select a lab.',
'reason_to_booking.required' => 'Please provide a reason for booking.',
'booking_date.required' => 'Please select a booking date.',
'start_time.required' => 'Please select a start time.',
'end_time.required' => 'Please select an end time.',
'lab_id.required' => 'Silahkan pilih ruangan.',
'reason_to_booking.required' => 'Silahkan mengisi keperluan pesan.',
'booking_date.required' => 'Silahkan pilih tanggal pesan.',
'start_time.required' => 'Silahkan pilih waktu mulai.',
'end_time.required' => 'Silahkan pilih waktu selesai.',
];

public function bookingLab()
Expand All @@ -62,6 +62,8 @@ public function bookingLab()
session()->flash('conflict', 'Pada tanggal & jam tersebut ruangan sedang digunakan');
} else if (!$isLabAvailable) {
session()->flash('conflict', 'Pada hari & jam tersebut sedang ada perkuliahan di ruangan');
} else if ($this->start_time == $this->end_time) {
session()->flash('conflict', 'Waktu mulai dan selesai tidak boleh sama');
} else {

$data = [
Expand Down
2 changes: 1 addition & 1 deletion resources/views/home/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
setTimeout(() => {
toasty.classList.replace('data-[te-toast-show]:block', 'data-[te-toast-show]:hidden')
}, 2000);
}, 5000);
});
</script>
Expand Down

0 comments on commit 0b17bad

Please sign in to comment.