пластмассовый мир победил, мкет оказался сильней
parent
b0aca0e5d4
commit
c08817d049
|
|
@ -40,7 +40,24 @@ impl Default for App{
|
|||
Tab{
|
||||
tab_type: TabTypes::Worker,
|
||||
title: "Сотрудники".to_owned(),
|
||||
},
|
||||
Tab{
|
||||
tab_type: TabTypes::Salary,
|
||||
title:"Выплаты".to_owned(),
|
||||
},
|
||||
Tab{
|
||||
tab_type: TabTypes::Position,
|
||||
title: "Должности".to_owned(),
|
||||
},
|
||||
Tab{
|
||||
tab_type: TabTypes::Recipe,
|
||||
title: "Рецеты".to_owned(),
|
||||
},
|
||||
Tab{
|
||||
tab_type: TabTypes::Product,
|
||||
title: "Продукция".to_owned()
|
||||
}
|
||||
|
||||
]);
|
||||
Self{tree}
|
||||
}
|
||||
|
|
@ -116,6 +133,10 @@ impl MainTabViewer{
|
|||
|
||||
}
|
||||
fn show_worker(&mut self, ui: &mut egui::Ui){
|
||||
todo!()
|
||||
|
||||
}
|
||||
fn show_position(&mut self, ui: &mut egui::Ui){
|
||||
let rt = tokio::runtime::Runtime::new().unwrap();
|
||||
rt.block_on(async{
|
||||
for eq in self.positions.read().clone().unwrap().iter(){
|
||||
|
|
@ -125,10 +146,10 @@ impl MainTabViewer{
|
|||
.show(ui, |ui|{
|
||||
ui.label(eq.wage.to_string());
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
fn show_salary(&mut self, ui: &mut egui::Ui){
|
||||
ui.label("Salary");
|
||||
|
|
@ -157,6 +178,9 @@ impl egui_dock::TabViewer for MainTabViewer{
|
|||
},
|
||||
TabTypes::Material => {
|
||||
&self.show_material(ui);
|
||||
},
|
||||
TabTypes::Position =>{
|
||||
&self.show_position(ui);
|
||||
}
|
||||
_ =>{
|
||||
ui.label("This is not");
|
||||
|
|
|
|||
Loading…
Reference in New Issue