From c08817d0493809e2ab697efd786b090162c8a7c8 Mon Sep 17 00:00:00 2001 From: ultrageese Date: Sat, 16 May 2026 20:04:06 +1000 Subject: [PATCH] =?UTF-8?q?=20=D0=BF=D0=BB=D0=B0=D1=81=D1=82=D0=BC=D0=B0?= =?UTF-8?q?=D1=81=D1=81=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BC=D0=B8=D1=80=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B1=D0=B5=D0=B4=D0=B8=D0=BB,=20=D0=BC=D0=BA?= =?UTF-8?q?=D0=B5=D1=82=20=D0=BE=D0=BA=D0=B0=D0=B7=D0=B0=D0=BB=D1=81=D1=8F?= =?UTF-8?q?=20=D1=81=D0=B8=D0=BB=D1=8C=D0=BD=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/src/app.rs | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/code/src/app.rs b/code/src/app.rs index 8d49f34..8e9f6cb 100644 --- a/code/src/app.rs +++ b/code/src/app.rs @@ -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,19 +133,23 @@ 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(){ + for eq in self.positions.read().clone().unwrap().iter(){ ui.push_id(&eq.name, |ui|{ egui::CollapsingHeader::new(&eq.name) .default_open(false) .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");