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::base_html;
|
||||||
@use super::components::close_shift_button_html;
|
@use super::components::shift_button_html;
|
||||||
@use super::components::open_shift_button_html;
|
|
||||||
@use cm_lib::models::Shift;
|
@use cm_lib::models::Shift;
|
||||||
|
|
||||||
@(open_shift: Option<Shift>)
|
@(open_shift: Option<Shift>)
|
||||||
|
@ -9,11 +8,7 @@
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<div>
|
<div>
|
||||||
@if open_shift.is_none() {
|
@:shift_button_html(open_shift)
|
||||||
@:open_shift_button_html()
|
|
||||||
} else {
|
|
||||||
@:close_shift_button_html(open_shift.unwrap())
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue