Add subcommands 'list' and 'modify'

This commit is contained in:
2023-06-03 15:27:09 +02:00
parent 5681b1dee3
commit ca145f5e4b
9 changed files with 290 additions and 48 deletions

View File

@@ -22,6 +22,7 @@
* SOFTWARE.
*/
use console::style;
use serde::{Deserialize, Serialize};
use crate::model::Ordner;
@@ -168,6 +169,21 @@ impl Unterformular {
})
}
}
pub fn to_listed_string(&self) -> String {
if self.hat_unterformulare {
return format!(
"Unterformular '{}' in Revision '{}' {}",
self.name,
self.revision,
style("Unterformular mit Markierung 'hat Unterformulare'!").red()
);
}
format!(
"Unterformular '{}' in Revision '{}'",
self.name, self.revision
)
}
}
#[derive(Serialize, Deserialize, Debug)]