Fix admin page
This commit is contained in:
parent
f314c4d63d
commit
0989a48065
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -35,7 +35,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "actix-admin"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/Eraden/actix-admin.git#72b10d8994a2b7a19e5f0fd3cad187c11ed3cc21"
|
||||
source = "git+https://code.ita-prog.pl/Tsumanu/actix-admin.git#62f8be3310eddf772b98ce2d36f1954cfa871059"
|
||||
dependencies = [
|
||||
"actix-admin-macros",
|
||||
"actix-files",
|
||||
@ -60,7 +60,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "actix-admin-macros"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/Eraden/actix-admin.git#72b10d8994a2b7a19e5f0fd3cad187c11ed3cc21"
|
||||
source = "git+https://code.ita-prog.pl/Tsumanu/actix-admin.git#62f8be3310eddf772b98ce2d36f1954cfa871059"
|
||||
dependencies = [
|
||||
"bae",
|
||||
"proc-macro2",
|
||||
|
@ -5,7 +5,8 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
# actix-admin = "0.5.0"
|
||||
actix-admin = { git = "https://github.com/Eraden/actix-admin.git", features = ['enable-tracing'] }
|
||||
# actix-admin = { git = "https://github.com/Eraden/actix-admin.git", features = ['enable-tracing'] }
|
||||
actix-admin = { git = "https://code.ita-prog.pl/Tsumanu/actix-admin.git", features = ['enable-tracing'] }
|
||||
actix-web = "4.3.1"
|
||||
actix-web-grants = "3.0.2"
|
||||
askama = "0.12.0"
|
||||
|
@ -6,7 +6,8 @@ edition = "2021"
|
||||
[dependencies]
|
||||
actix = "0.13.0"
|
||||
# actix-admin = "0.5.0"
|
||||
actix-admin = { git = "https://github.com/Eraden/actix-admin.git" }
|
||||
# actix-admin = { git = "https://github.com/Eraden/actix-admin.git", features = ['enable-tracing'] }
|
||||
actix-admin = { git = "https://code.ita-prog.pl/Tsumanu/actix-admin.git", features = ['enable-tracing'] }
|
||||
actix-rt = { version = "2.8.0", features = [] }
|
||||
chrono = "0.4.26"
|
||||
regex = "1.9.1"
|
||||
|
@ -1,8 +1,7 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
use super::sea_orm_active_enums::Userrole;
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||
pub struct Entity;
|
||||
@ -65,7 +64,6 @@ impl PrimaryKeyTrait for PrimaryKey {
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||
pub enum Relation {
|
||||
Images,
|
||||
ParkingSpaces,
|
||||
}
|
||||
|
||||
@ -89,18 +87,11 @@ impl ColumnTrait for Column {
|
||||
impl RelationTrait for Relation {
|
||||
fn def(&self) -> RelationDef {
|
||||
match self {
|
||||
Self::Images => Entity::has_many(super::images::Entity).into(),
|
||||
Self::ParkingSpaces => Entity::has_many(super::parking_spaces::Entity).into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Related<super::images::Entity> for Entity {
|
||||
fn to() -> RelationDef {
|
||||
Relation::Images.def()
|
||||
}
|
||||
}
|
||||
|
||||
impl Related<super::parking_spaces::Entity> for Entity {
|
||||
fn to() -> RelationDef {
|
||||
Relation::ParkingSpaces.def()
|
||||
|
@ -1,8 +1,7 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
use super::sea_orm_active_enums::ImageState;
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||
pub struct Entity;
|
||||
@ -60,9 +59,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||
pub enum Relation {
|
||||
Accounts,
|
||||
}
|
||||
pub enum Relation {}
|
||||
|
||||
impl ColumnTrait for Column {
|
||||
type EntityName = Entity;
|
||||
@ -81,18 +78,7 @@ impl ColumnTrait for Column {
|
||||
|
||||
impl RelationTrait for Relation {
|
||||
fn def(&self) -> RelationDef {
|
||||
match self {
|
||||
Self::Accounts => Entity::belongs_to(super::accounts::Entity)
|
||||
.from(Column::AccountId)
|
||||
.to(super::accounts::Column::Id)
|
||||
.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Related<super::accounts::Entity> for Entity {
|
||||
fn to() -> RelationDef {
|
||||
Relation::Accounts.def()
|
||||
panic!("No RelationDef")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
use super::sea_orm_active_enums::ParkingSpaceState;
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||
pub struct Entity;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
pub use super::accounts::Entity as Accounts;
|
||||
pub use super::images::Entity as Images;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
[toolchain]
|
||||
channel = "nightly-2022-10-29"
|
||||
# channel = "nightly-2022-10-29"
|
||||
channel = "stable"
|
||||
components = ['rust-analyzer', "rustfmt"]
|
||||
targets = []
|
||||
profile = "default"
|
||||
|
Loading…
Reference in New Issue
Block a user