Close delete epic modal when have related issues
This commit is contained in:
parent
1c8c78aadf
commit
ce6205f61d
@ -162,6 +162,22 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin: {
|
||||
bottom: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
padding: {
|
||||
right: 40px;
|
||||
left: 40px;
|
||||
};
|
||||
> .styledButton {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use jirs_data::TimeTracking;
|
||||
|
||||
use crate::shared::{ToChild, ToNode};
|
||||
use crate::{FieldId, Msg};
|
||||
use {
|
||||
crate::{
|
||||
shared::{ToChild, ToNode},
|
||||
FieldId, Msg,
|
||||
},
|
||||
jirs_data::TimeTracking,
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StyledCheckboxState {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use crate::shared::ToNode;
|
||||
use crate::Msg;
|
||||
use {
|
||||
crate::{shared::ToNode, Msg},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StyledField<'l> {
|
||||
|
@ -1,11 +1,9 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use jirs_data::{IssuePriority, IssueType};
|
||||
|
||||
use crate::shared::ToNode;
|
||||
use crate::Msg;
|
||||
use {
|
||||
crate::{shared::ToNode, Msg},
|
||||
jirs_data::{IssuePriority, IssueType},
|
||||
seed::{prelude::*, *},
|
||||
std::borrow::Cow,
|
||||
};
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
@ -1,8 +1,8 @@
|
||||
use seed::{prelude::*, *};
|
||||
use web_sys::File;
|
||||
|
||||
use crate::shared::ToNode;
|
||||
use crate::{FieldId, Msg};
|
||||
use {
|
||||
crate::{shared::ToNode, FieldId, Msg},
|
||||
seed::{prelude::*, *},
|
||||
web_sys::File,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct StyledImageInputState {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use crate::shared::ToNode;
|
||||
use crate::Msg;
|
||||
use {
|
||||
crate::{shared::ToNode, Msg},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
pub struct StyledLink<'l> {
|
||||
children: Vec<Node<Msg>>,
|
||||
|
@ -10,8 +10,6 @@ use {
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
// pub trait ChildIter<'l> = Iterator<Item = StyledSelectChildBuilder<'l>>;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum StyledSelectChanged {
|
||||
Text(String),
|
||||
|
@ -1,7 +1,7 @@
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use crate::shared::ToNode;
|
||||
use crate::{FieldId, Msg};
|
||||
use {
|
||||
crate::{shared::ToNode, FieldId, Msg},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StyledTextarea<'l> {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use seed::{prelude::*, *};
|
||||
|
||||
use crate::shared::ToNode;
|
||||
use crate::Msg;
|
||||
use {
|
||||
crate::{shared::ToNode, Msg},
|
||||
seed::{prelude::*, *},
|
||||
};
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub enum Variant {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use {
|
||||
crate::{
|
||||
components::{styled_confirm_modal::*, styled_icon::*, styled_modal::*},
|
||||
components::{styled_button::*, styled_confirm_modal::*, styled_icon::*, styled_modal::*},
|
||||
modals::epic_delete::Model,
|
||||
model,
|
||||
shared::ToNode,
|
||||
@ -45,12 +45,25 @@ fn warning(model: &model::Model, modal: &Model) -> Node<Msg> {
|
||||
]]
|
||||
})
|
||||
.collect();
|
||||
|
||||
let close = StyledButton::build()
|
||||
.text("Close")
|
||||
.on_click(mouse_ev("click", move |ev| {
|
||||
ev.stop_propagation();
|
||||
ev.prevent_default();
|
||||
Msg::ModalDropped
|
||||
}))
|
||||
.secondary()
|
||||
.build()
|
||||
.into_node();
|
||||
|
||||
section![
|
||||
h3![C!["header"], "Cannot delete epic"],
|
||||
div![
|
||||
C!["warning"],
|
||||
"This epic have related issues. Please move or delete them first."
|
||||
],
|
||||
ol![C!["relatedList"], issues]
|
||||
ol![C!["relatedList"], issues],
|
||||
div![C!["actions"], close]
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user