move shift_button to its own component
parent
46613af5f3
commit
20b0ec7ff4
|
@ -0,0 +1,11 @@
|
|||
@use super::close_shift_button_html;
|
||||
@use super::open_shift_button_html;
|
||||
@use cm_lib::models::Shift;
|
||||
|
||||
@(open_shift: Option<Shift>)
|
||||
|
||||
@if open_shift.is_none() {
|
||||
@:open_shift_button_html()
|
||||
} else {
|
||||
@:close_shift_button_html(open_shift.unwrap())
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
@use super::base_html;
|
||||
@use super::components::close_shift_button_html;
|
||||
@use super::components::open_shift_button_html;
|
||||
@use super::components::shift_button_html;
|
||||
@use cm_lib::models::Shift;
|
||||
|
||||
@(open_shift: Option<Shift>)
|
||||
|
@ -9,11 +8,7 @@
|
|||
|
||||
<main>
|
||||
<div>
|
||||
@if open_shift.is_none() {
|
||||
@:open_shift_button_html()
|
||||
} else {
|
||||
@:close_shift_button_html(open_shift.unwrap())
|
||||
}
|
||||
@:shift_button_html(open_shift)
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
|
Loading…
Reference in New Issue