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]]
|
[[package]]
|
||||||
name = "actix-admin"
|
name = "actix-admin"
|
||||||
version = "0.5.0"
|
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 = [
|
dependencies = [
|
||||||
"actix-admin-macros",
|
"actix-admin-macros",
|
||||||
"actix-files",
|
"actix-files",
|
||||||
@ -60,7 +60,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-admin-macros"
|
name = "actix-admin-macros"
|
||||||
version = "0.5.0"
|
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 = [
|
dependencies = [
|
||||||
"bae",
|
"bae",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
@ -5,7 +5,8 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# actix-admin = "0.5.0"
|
# 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 = "4.3.1"
|
||||||
actix-web-grants = "3.0.2"
|
actix-web-grants = "3.0.2"
|
||||||
askama = "0.12.0"
|
askama = "0.12.0"
|
||||||
|
@ -6,7 +6,8 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
actix = "0.13.0"
|
actix = "0.13.0"
|
||||||
# actix-admin = "0.5.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 = [] }
|
actix-rt = { version = "2.8.0", features = [] }
|
||||||
chrono = "0.4.26"
|
chrono = "0.4.26"
|
||||||
regex = "1.9.1"
|
regex = "1.9.1"
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
//! `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::*;
|
|
||||||
|
|
||||||
use super::sea_orm_active_enums::Userrole;
|
use super::sea_orm_active_enums::Userrole;
|
||||||
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||||
pub struct Entity;
|
pub struct Entity;
|
||||||
@ -65,7 +64,6 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
pub enum Relation {
|
pub enum Relation {
|
||||||
Images,
|
|
||||||
ParkingSpaces,
|
ParkingSpaces,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,18 +87,11 @@ impl ColumnTrait for Column {
|
|||||||
impl RelationTrait for Relation {
|
impl RelationTrait for Relation {
|
||||||
fn def(&self) -> RelationDef {
|
fn def(&self) -> RelationDef {
|
||||||
match self {
|
match self {
|
||||||
Self::Images => Entity::has_many(super::images::Entity).into(),
|
|
||||||
Self::ParkingSpaces => Entity::has_many(super::parking_spaces::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 {
|
impl Related<super::parking_spaces::Entity> for Entity {
|
||||||
fn to() -> RelationDef {
|
fn to() -> RelationDef {
|
||||||
Relation::ParkingSpaces.def()
|
Relation::ParkingSpaces.def()
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
//! `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::*;
|
|
||||||
|
|
||||||
use super::sea_orm_active_enums::ImageState;
|
use super::sea_orm_active_enums::ImageState;
|
||||||
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||||
pub struct Entity;
|
pub struct Entity;
|
||||||
@ -60,9 +59,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
pub enum Relation {
|
pub enum Relation {}
|
||||||
Accounts,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ColumnTrait for Column {
|
impl ColumnTrait for Column {
|
||||||
type EntityName = Entity;
|
type EntityName = Entity;
|
||||||
@ -81,18 +78,7 @@ impl ColumnTrait for Column {
|
|||||||
|
|
||||||
impl RelationTrait for Relation {
|
impl RelationTrait for Relation {
|
||||||
fn def(&self) -> RelationDef {
|
fn def(&self) -> RelationDef {
|
||||||
match self {
|
panic!("No RelationDef")
|
||||||
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()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
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::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
//! `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::*;
|
|
||||||
|
|
||||||
use super::sea_orm_active_enums::ParkingSpaceState;
|
use super::sea_orm_active_enums::ParkingSpaceState;
|
||||||
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||||
pub struct Entity;
|
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::accounts::Entity as Accounts;
|
||||||
pub use super::images::Entity as Images;
|
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::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2022-10-29"
|
# channel = "nightly-2022-10-29"
|
||||||
|
channel = "stable"
|
||||||
components = ['rust-analyzer', "rustfmt"]
|
components = ['rust-analyzer', "rustfmt"]
|
||||||
targets = []
|
targets = []
|
||||||
profile = "default"
|
profile = "default"
|
||||||
|
Loading…
Reference in New Issue
Block a user