1
0
mirror of https://github.com/pcvolkmer/osc-variant.git synced 2025-04-19 19:56:50 +00:00

feat: remove error messages from list subcommand

This commit is contained in:
Paul-Christian Volkmer 2023-12-06 12:01:18 +01:00
parent 70562f99ca
commit 9ab00ce192
2 changed files with 3 additions and 20 deletions

View File

@ -209,25 +209,13 @@ 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(),
if self
.entries
.entry
.iter()
.filter(|entry| entry.procedure_date_status != "none")
.count()
== 0
{
style("Formular hat keine Angabe zum Prozedurdatum!").red()
} else {
style("")
}
style(&self.revision).yellow()
)
}
}

View File

@ -212,18 +212,13 @@ impl FormEntryContainer for Unterformular {
impl Listable for Unterformular {
fn to_listed_string(&self) -> String {
format!(
"Unterformular ({}) '{}' in Revision '{}' {}",
"Unterformular ({}) '{}' in Revision '{}'",
match self.is_system_library_content() {
true => style("S").yellow(),
_ => style("u"),
},
style(&self.name).yellow(),
style(&self.revision).yellow(),
if self.hat_unterformulare {
style("Unterformular mit Markierung 'hat Unterformulare'!").red()
} else {
style("")
}
)
}
}