гавно не рабоает правильно но сейчас надо готовиться к экзамену
parent
e4e5604186
commit
1de79d64ff
267
code/src/app.rs
267
code/src/app.rs
|
|
@ -9,14 +9,15 @@ use crate::{
|
||||||
database::DBOperator,
|
database::DBOperator,
|
||||||
material_tab::MaterialTabViewer,
|
material_tab::MaterialTabViewer,
|
||||||
models::{
|
models::{
|
||||||
Equipment, LoginModalState, LoginStatus, Material, MaterialCategory, MaterialRow,
|
Equipment, EquipmentModalState, LoginModalState, LoginStatus, Material, MaterialCategory,
|
||||||
ModalStatus, ModalWinState, Position, Salary, SalaryModalState, Worker,
|
MaterialRow, ModalStatus, ModalWinState, Position, Salary, SalaryModalState, Worker,
|
||||||
},
|
},
|
||||||
recipe_tab::RecipeTabViewer,
|
recipe_tab::RecipeTabViewer,
|
||||||
reports::Reporter,
|
reports::Reporter,
|
||||||
tab::*,
|
tab::*,
|
||||||
worker_tab::{self, *},
|
worker_tab::{self, *},
|
||||||
};
|
};
|
||||||
|
use chrono::NaiveDate;
|
||||||
use egui::{TextBuffer, Vec2, mutex::RwLock};
|
use egui::{TextBuffer, Vec2, mutex::RwLock};
|
||||||
use egui_dock::{DockArea, Style, TabViewer};
|
use egui_dock::{DockArea, Style, TabViewer};
|
||||||
use egui_extras::{Column, TableBuilder};
|
use egui_extras::{Column, TableBuilder};
|
||||||
|
|
@ -55,11 +56,11 @@ impl Default for App<'_> {
|
||||||
tab_type: TabTypes::Recipe,
|
tab_type: TabTypes::Recipe,
|
||||||
title: "Рецепты".to_owned(),
|
title: "Рецепты".to_owned(),
|
||||||
},
|
},
|
||||||
Tab{
|
Tab {
|
||||||
tab_type: TabTypes::Order,
|
tab_type: TabTypes::Order,
|
||||||
title: "Заказы".to_owned(),
|
title: "Заказы".to_owned(),
|
||||||
},
|
},
|
||||||
Tab{
|
Tab {
|
||||||
tab_type: TabTypes::Client,
|
tab_type: TabTypes::Client,
|
||||||
title: "Клиенты".to_owned(),
|
title: "Клиенты".to_owned(),
|
||||||
},
|
},
|
||||||
|
|
@ -187,7 +188,7 @@ struct MainTabViewer {
|
||||||
material_tree: egui_dock::DockState<Tab>,
|
material_tree: egui_dock::DockState<Tab>,
|
||||||
recipe_tab: RecipeTabViewer,
|
recipe_tab: RecipeTabViewer,
|
||||||
rt: tokio::runtime::Runtime,
|
rt: tokio::runtime::Runtime,
|
||||||
equipment_modal_state: ModalWinState,
|
equipment_modal_state: EquipmentModalState,
|
||||||
salary_modal_state: SalaryModalState,
|
salary_modal_state: SalaryModalState,
|
||||||
is_dark_theme: bool,
|
is_dark_theme: bool,
|
||||||
interface_scale_ratio: f32,
|
interface_scale_ratio: f32,
|
||||||
|
|
@ -236,15 +237,10 @@ impl Default for MainTabViewer {
|
||||||
is_dark_theme: true,
|
is_dark_theme: true,
|
||||||
interface_scale_ratio: 1.2,
|
interface_scale_ratio: 1.2,
|
||||||
|
|
||||||
equipment_modal_state: ModalWinState {
|
equipment_modal_state: EquipmentModalState {
|
||||||
is_open: false,
|
is_open: false,
|
||||||
can_finish: false,
|
can_finish: false,
|
||||||
data: HashMap::from([
|
equipment: Equipment::default(),
|
||||||
("id".to_owned(), String::new()),
|
|
||||||
("inv_number".to_owned(), String::new()),
|
|
||||||
("maintenance_date".to_owned(), String::new()),
|
|
||||||
("worker_id".to_owned(), String::new()),
|
|
||||||
]),
|
|
||||||
status: ModalStatus::Add,
|
status: ModalStatus::Add,
|
||||||
},
|
},
|
||||||
salary_modal_state: SalaryModalState {
|
salary_modal_state: SalaryModalState {
|
||||||
|
|
@ -325,21 +321,7 @@ impl MainTabViewer {
|
||||||
if ui.button("Добавить").clicked() {
|
if ui.button("Добавить").clicked() {
|
||||||
self.equipment_modal_state.is_open = true;
|
self.equipment_modal_state.is_open = true;
|
||||||
self.equipment_modal_state.status = ModalStatus::Add;
|
self.equipment_modal_state.status = ModalStatus::Add;
|
||||||
self.equipment_modal_state
|
self.equipment_modal_state.equipment = Equipment::default();
|
||||||
.data
|
|
||||||
.insert("id".into(), "0".into());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("name".into(), "".into());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("inv_number".into(), "".into());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("worker_id".into(), "0".into());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("maintenance_date".into(), "".into());
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -396,46 +378,21 @@ impl MainTabViewer {
|
||||||
if ui.button("Списать").clicked() {
|
if ui.button("Списать").clicked() {
|
||||||
self.equipment_modal_state.is_open = true;
|
self.equipment_modal_state.is_open = true;
|
||||||
self.equipment_modal_state.status = ModalStatus::Remove;
|
self.equipment_modal_state.status = ModalStatus::Remove;
|
||||||
self.equipment_modal_state
|
self.equipment_modal_state.equipment = eq.clone();
|
||||||
.data
|
|
||||||
.insert("id".into(), eq.id.to_string());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("name".into(), eq.name.clone());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("inv_number".into(), eq.inv_number.clone());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("worker_id".into(), eq.worker.id.to_string());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if row.response().double_clicked() {
|
if row.response().double_clicked() {
|
||||||
self.equipment_modal_state.is_open = true;
|
self.equipment_modal_state.is_open = true;
|
||||||
self.equipment_modal_state.status = ModalStatus::Edit;
|
self.equipment_modal_state.status = ModalStatus::Edit;
|
||||||
self.equipment_modal_state
|
self.equipment_modal_state.equipment = eq.clone();
|
||||||
.data
|
|
||||||
.insert("id".into(), eq.id.to_string());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("name".into(), eq.name.clone());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("inv_number".into(), eq.inv_number.clone());
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.insert("worker_id".into(), eq.worker.id.to_string());
|
|
||||||
self.equipment_modal_state.data.insert(
|
|
||||||
"maintenance_date".into(),
|
|
||||||
eq.maintenance_date.date_naive().to_string(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if self.equipment_modal_state.is_open {
|
if self.equipment_modal_state.is_open {
|
||||||
egui::Modal::new(egui::Id::new("process_equipment_modal")).show(ui.ctx(), |ui| {
|
egui::Modal::new(egui::Id::new("process_equipment_modal")).show(ui.ctx(), |ui| {
|
||||||
|
let mut date_okay = false;
|
||||||
if ui.button("Закрыть").clicked() || ui.input(|i| i.key_pressed(egui::Key::Escape))
|
if ui.button("Закрыть").clicked() || ui.input(|i| i.key_pressed(egui::Key::Escape))
|
||||||
{
|
{
|
||||||
self.equipment_modal_state.is_open = false;
|
self.equipment_modal_state.is_open = false;
|
||||||
|
|
@ -443,53 +400,38 @@ impl MainTabViewer {
|
||||||
if self.equipment_modal_state.status != ModalStatus::Remove {
|
if self.equipment_modal_state.status != ModalStatus::Remove {
|
||||||
egui::Grid::new("process_equipment_grid").show(ui, |ui| {
|
egui::Grid::new("process_equipment_grid").show(ui, |ui| {
|
||||||
ui.label("Название");
|
ui.label("Название");
|
||||||
let mut name = self.equipment_modal_state.data.get_mut("name").unwrap();
|
|
||||||
ui.add_sized(
|
ui.add_sized(
|
||||||
Vec2::new(200.0, 20.0),
|
Vec2::new(200.0, 20.0),
|
||||||
egui::TextEdit::singleline(name).hint_text("Название оборудования"),
|
egui::TextEdit::singleline(
|
||||||
|
&mut self.equipment_modal_state.equipment.name,
|
||||||
|
)
|
||||||
|
.hint_text("Название оборудования"),
|
||||||
);
|
);
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
|
||||||
ui.label("Инв. номер");
|
ui.label("Инв. номер");
|
||||||
ui.add(
|
ui.add(
|
||||||
egui::TextEdit::singleline(
|
egui::TextEdit::singleline(
|
||||||
self.equipment_modal_state
|
&mut self.equipment_modal_state.equipment.inv_number,
|
||||||
.data
|
|
||||||
.get_mut("inv_number")
|
|
||||||
.unwrap(),
|
|
||||||
)
|
)
|
||||||
.hint_text("НН-00"),
|
.hint_text("НН-00"),
|
||||||
);
|
);
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
|
||||||
ui.label("Ответственный");
|
ui.label("Ответственный");
|
||||||
let workname = self
|
|
||||||
.workers
|
|
||||||
.read()
|
|
||||||
.clone()
|
|
||||||
.iter()
|
|
||||||
.find(|w| {
|
|
||||||
w.id.to_string()
|
|
||||||
== self
|
|
||||||
.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("worker_id")
|
|
||||||
.unwrap()
|
|
||||||
.clone()
|
|
||||||
})
|
|
||||||
.unwrap_or(&Worker::default())
|
|
||||||
.full_name
|
|
||||||
.clone();
|
|
||||||
egui::ComboBox::new("process_equipment_combobox", "")
|
egui::ComboBox::new("process_equipment_combobox", "")
|
||||||
.selected_text(workname)
|
.selected_text(
|
||||||
|
self.equipment_modal_state
|
||||||
|
.equipment
|
||||||
|
.worker
|
||||||
|
.full_name
|
||||||
|
.clone(),
|
||||||
|
)
|
||||||
.show_ui(ui, |ui| {
|
.show_ui(ui, |ui| {
|
||||||
for wkrk in self.workers.read().clone().iter() {
|
for wkrk in self.workers.read().clone().iter() {
|
||||||
ui.selectable_value(
|
ui.selectable_value(
|
||||||
self.equipment_modal_state
|
&mut self.equipment_modal_state.equipment.worker,
|
||||||
.data
|
wkrk.clone(),
|
||||||
.get_mut("worker_id")
|
|
||||||
.unwrap(),
|
|
||||||
wkrk.id.to_string(),
|
|
||||||
&wkrk.full_name,
|
&wkrk.full_name,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -497,142 +439,75 @@ impl MainTabViewer {
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
|
||||||
ui.label("Дата последнего\nтехобслуживания");
|
ui.label("Дата последнего\nтехобслуживания");
|
||||||
ui.add(
|
let mut date = self
|
||||||
egui::TextEdit::singleline(
|
.equipment_modal_state
|
||||||
self.equipment_modal_state
|
.equipment
|
||||||
.data
|
.maintenance_date
|
||||||
.get_mut("maintenance_date")
|
.date_naive()
|
||||||
.unwrap(),
|
.to_string();
|
||||||
)
|
let bdate = date.clone();
|
||||||
.hint_text("1970-01-01"),
|
ui.add(egui::TextEdit::singleline(&mut date).hint_text("1970-01-01"));
|
||||||
);
|
if date != bdate {
|
||||||
|
self.equipment_modal_state.equipment.maintenance_date =
|
||||||
|
match NaiveDate::parse_from_str(&date, "%Y-%m-%d") {
|
||||||
|
Ok(o) => {date_okay = true;
|
||||||
|
o
|
||||||
|
.and_hms_opt(0, 0, 0)
|
||||||
|
.unwrap()
|
||||||
|
.and_local_timezone(chrono::Local)
|
||||||
|
.unwrap()},
|
||||||
|
Err(e) => {
|
||||||
|
date_okay = false;
|
||||||
|
NaiveDate::default()
|
||||||
|
.and_hms_opt(0, 0, 0)
|
||||||
|
.unwrap()
|
||||||
|
.and_local_timezone(chrono::Local)
|
||||||
|
.unwrap()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ui.label("Вы уверены, что хотите удалить:");
|
ui.label("Вы уверены, что хотите удалить:");
|
||||||
ui.strong(format!(
|
ui.strong(format!(
|
||||||
"{} | {}?",
|
"{} | {}?",
|
||||||
self.equipment_modal_state.data.get("name").unwrap(),
|
self.equipment_modal_state.equipment.name,
|
||||||
self.equipment_modal_state.data.get("inv_number").unwrap()
|
self.equipment_modal_state.equipment.inv_number
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
let btext = match self.equipment_modal_state.status {
|
let btext = match &self.equipment_modal_state.status {
|
||||||
ModalStatus::Add => "Добавить",
|
ModalStatus::Add => "Добавить",
|
||||||
ModalStatus::Edit => "Сохранить",
|
ModalStatus::Edit => "Сохранить",
|
||||||
ModalStatus::Remove => "Списать",
|
ModalStatus::Remove => "Списать",
|
||||||
};
|
};
|
||||||
if ui.button(btext).clicked() {
|
match &self.equipment_modal_state.status {
|
||||||
match self.equipment_modal_state.status {
|
ModalStatus::Remove => {
|
||||||
|
self.equipment_modal_state.can_finish = true;
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
self.equipment_modal_state.can_finish =
|
||||||
|
self.equipment_modal_state.equipment.name.len() > 0 && date_okay
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let resp = ui.add_enabled(self.equipment_modal_state.can_finish,egui::Button::new(btext));
|
||||||
|
if resp.clicked() {
|
||||||
|
match &self.equipment_modal_state.status {
|
||||||
ModalStatus::Add => self.rt.block_on(async {
|
ModalStatus::Add => self.rt.block_on(async {
|
||||||
self.db_oper
|
self.db_oper
|
||||||
.add_equipment(Equipment {
|
.add_equipment(self.equipment_modal_state.equipment.clone())
|
||||||
id: 0,
|
|
||||||
name: self
|
|
||||||
.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("name")
|
|
||||||
.unwrap_or(&String::new())
|
|
||||||
.clone(),
|
|
||||||
inv_number: self
|
|
||||||
.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("inv_number")
|
|
||||||
.unwrap_or(&String::new())
|
|
||||||
.clone(),
|
|
||||||
maintenance_date: chrono::NaiveDate::from_str(
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("maintenance_date")
|
|
||||||
.unwrap_or(&"1970.01.01".to_owned()),
|
|
||||||
)
|
|
||||||
.unwrap()
|
|
||||||
.and_hms_opt(0, 0, 0)
|
|
||||||
.unwrap()
|
|
||||||
.and_local_timezone(chrono::Local)
|
|
||||||
.unwrap(),
|
|
||||||
worker: self
|
|
||||||
.workers
|
|
||||||
.read()
|
|
||||||
.clone()
|
|
||||||
.iter()
|
|
||||||
.find(|w| {
|
|
||||||
&w.id.to_string()
|
|
||||||
== self
|
|
||||||
.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("worker_id")
|
|
||||||
.unwrap_or(&"0".to_owned())
|
|
||||||
})
|
|
||||||
.unwrap()
|
|
||||||
.clone(),
|
|
||||||
is_written_off: false,
|
|
||||||
})
|
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}),
|
}),
|
||||||
ModalStatus::Edit => self.rt.block_on(async {
|
ModalStatus::Edit => self.rt.block_on(async {
|
||||||
self.db_oper
|
self.db_oper
|
||||||
.update_equipment(Equipment {
|
.update_equipment(self.equipment_modal_state.equipment.clone())
|
||||||
id: self
|
|
||||||
.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("id")
|
|
||||||
.unwrap()
|
|
||||||
.parse::<i32>()
|
|
||||||
.unwrap(),
|
|
||||||
name: self
|
|
||||||
.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("name")
|
|
||||||
.unwrap_or(&String::new())
|
|
||||||
.clone(),
|
|
||||||
inv_number: self
|
|
||||||
.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("inv_number")
|
|
||||||
.unwrap_or(&String::new())
|
|
||||||
.clone(),
|
|
||||||
maintenance_date: chrono::NaiveDate::from_str(
|
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("maintenance_date")
|
|
||||||
.unwrap_or(&"1970.01.01".to_owned()),
|
|
||||||
)
|
|
||||||
.unwrap()
|
|
||||||
.and_hms_opt(0, 0, 0)
|
|
||||||
.unwrap()
|
|
||||||
.and_local_timezone(chrono::Local)
|
|
||||||
.unwrap(),
|
|
||||||
worker: self
|
|
||||||
.workers
|
|
||||||
.read()
|
|
||||||
.clone()
|
|
||||||
.iter()
|
|
||||||
.find(|w| {
|
|
||||||
&w.id.to_string()
|
|
||||||
== self
|
|
||||||
.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("worker_id")
|
|
||||||
.unwrap_or(&"0".to_owned())
|
|
||||||
})
|
|
||||||
.unwrap()
|
|
||||||
.clone(),
|
|
||||||
is_written_off: false,
|
|
||||||
})
|
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}),
|
}),
|
||||||
ModalStatus::Remove => {
|
ModalStatus::Remove => {
|
||||||
self.rt.block_on(async {
|
self.rt.block_on(async {
|
||||||
self.db_oper
|
self.db_oper
|
||||||
.write_off_equipment(
|
.write_off_equipment(self.equipment_modal_state.equipment.id)
|
||||||
self.equipment_modal_state
|
|
||||||
.data
|
|
||||||
.get("id")
|
|
||||||
.unwrap()
|
|
||||||
.parse::<i32>()
|
|
||||||
.unwrap(),
|
|
||||||
)
|
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
pub mod options;
|
|
||||||
mod traits;
|
|
||||||
pub mod worker;
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
pub struct Options {
|
|
||||||
pub connection_string: String,
|
|
||||||
}
|
|
||||||
impl Options {
|
|
||||||
pub fn new() -> Self {
|
|
||||||
let settings = match config::Config::builder()
|
|
||||||
.add_source(config::File::with_name("appsettings"))
|
|
||||||
.build()
|
|
||||||
{
|
|
||||||
Ok(n) => n,
|
|
||||||
Err(_) => config::Config::default(),
|
|
||||||
};
|
|
||||||
Self {
|
|
||||||
connection_string: settings.get("connection_string").unwrap_or_default(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
use crate::models::Worker;
|
|
||||||
|
|
||||||
pub trait WorkerRepository {
|
|
||||||
async fn add(&self, worker: Worker) -> Result<(), sqlx::Error>;
|
|
||||||
async fn get_all(&self) -> Result<Vec<Worker>, sqlx::Error>;
|
|
||||||
async fn get_some(&self, start: u32, amount: u32) -> Result<Vec<Worker>, sqlx::Error>;
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
use sqlx::mysql::MySqlPool;
|
|
||||||
pub struct WorkerRepo {
|
|
||||||
pool: MySqlPool,
|
|
||||||
options: super::options::Options,
|
|
||||||
}
|
|
||||||
impl WorkerRepo {
|
|
||||||
pub fn new() -> Result<Self, sqlx::Error> {
|
|
||||||
let options = super::options::Options::new();
|
|
||||||
let pool = match MySqlPool::connect_lazy(&options.connection_string) {
|
|
||||||
Ok(n) => n,
|
|
||||||
Err(e) => {
|
|
||||||
return Err(e);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Ok(Self { pool, options })
|
|
||||||
}
|
|
||||||
pub async fn add(&self, work)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
mod app;
|
mod app;
|
||||||
mod database;
|
mod database;
|
||||||
mod db;
|
|
||||||
mod material_tab;
|
mod material_tab;
|
||||||
mod models;
|
mod models;
|
||||||
mod production_tab;
|
mod production_tab;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use std::{any::TypeId, collections::HashSet, ops::Deref};
|
use std::{any::TypeId, collections::HashSet, ops::Deref};
|
||||||
|
|
||||||
|
use chrono::Local;
|
||||||
use egui::TextBuffer;
|
use egui::TextBuffer;
|
||||||
use sqlx::{
|
use sqlx::{
|
||||||
prelude::FromRow,
|
prelude::FromRow,
|
||||||
|
|
@ -148,6 +149,20 @@ pub struct User {
|
||||||
is_admin: bool,
|
is_admin: bool,
|
||||||
worker: Worker,
|
worker: Worker,
|
||||||
}
|
}
|
||||||
|
pub struct Promotion {
|
||||||
|
pub worker: Worker,
|
||||||
|
pub to_position: Position,
|
||||||
|
pub date: DateTime<Local>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
pub struct EquipmentModalState {
|
||||||
|
pub is_open: bool,
|
||||||
|
pub can_finish: bool,
|
||||||
|
pub equipment: Equipment,
|
||||||
|
pub status: ModalStatus,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct ModalWinState {
|
pub struct ModalWinState {
|
||||||
pub is_open: bool,
|
pub is_open: bool,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ use std::default::Default;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
mod db;
|
|
||||||
|
|
||||||
use crate::database::*;
|
use crate::database::*;
|
||||||
use crate::models::{ModalStatus, ModalWinState, Position, Worker, WorkerRow};
|
use crate::models::{ModalStatus, ModalWinState, Position, Worker, WorkerRow};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue