2023-09-21 17:44:53 +00:00
|
|
|
@use super::base_html;
|
2023-09-26 09:18:12 +00:00
|
|
|
@use super::components::close_shift_button_html;
|
|
|
|
@use super::components::open_shift_button_html;
|
|
|
|
@use cm_lib::models::Shift;
|
2023-09-21 17:44:53 +00:00
|
|
|
|
2023-09-26 09:18:12 +00:00
|
|
|
@(open_shift: Option<Shift>)
|
2023-09-21 17:44:53 +00:00
|
|
|
|
|
|
|
@:base_html({
|
|
|
|
|
2023-09-26 09:18:12 +00:00
|
|
|
<main>
|
|
|
|
<div>
|
|
|
|
@if open_shift.is_none() {
|
|
|
|
@:open_shift_button_html()
|
|
|
|
} else {
|
2023-09-27 00:00:01 +00:00
|
|
|
@:close_shift_button_html(open_shift.unwrap())
|
2023-09-26 09:18:12 +00:00
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</main>
|
2023-09-21 17:44:53 +00:00
|
|
|
|
|
|
|
})
|