From 9ab00ce192398f9474a7fa10e0d2f585932f5ee9 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Wed, 6 Dec 2023 12:01:18 +0100 Subject: [PATCH] feat: remove error messages from list subcommand --- src/model/data_form.rs | 16 ++-------------- src/model/unterformular.rs | 7 +------ 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/model/data_form.rs b/src/model/data_form.rs index 92ed545..110afb7 100644 --- a/src/model/data_form.rs +++ b/src/model/data_form.rs @@ -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() ) } } diff --git a/src/model/unterformular.rs b/src/model/unterformular.rs index 1709c1b..deabc49 100644 --- a/src/model/unterformular.rs +++ b/src/model/unterformular.rs @@ -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("") - } ) } }