mirror of
https://github.com/pcvolkmer/osc-variant.git
synced 2025-07-02 00:42:53 +00:00
Show notice if form has no field to be used as procedure date
This indicates that the form cannot be used as main form, but as subform only.
This commit is contained in:
@ -192,13 +192,25 @@ impl FormEntryContainer for DataForm {
|
||||
impl Listable for DataForm {
|
||||
fn to_listed_string(&self) -> String {
|
||||
format!(
|
||||
"Formular ({}) '{}' in Revision '{}'",
|
||||
"Formular ({}) '{}' in Revision '{}' {}",
|
||||
match self.is_system_library_content() {
|
||||
true => style("S").yellow(),
|
||||
_ => style("u"),
|
||||
},
|
||||
style(&self.name).yellow(),
|
||||
style(&self.revision).yellow()
|
||||
style(&self.revision).yellow(),
|
||||
if self
|
||||
.entries
|
||||
.entry
|
||||
.iter()
|
||||
.filter(|entry| entry.procedure_date_status != "none")
|
||||
.count()
|
||||
== 0
|
||||
{
|
||||
style("Formular hat keine Angabe zum Prozedurdatum!").red()
|
||||
} else {
|
||||
style("")
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user