Run cargo fmt on the unit code and drop a quantity box's invalid mark when its line is removed
The new CI runs cargo fmt --check. QuantityInput also reported its validity only when it changed, so removing a line whose quantity box held bad text left that box counted as invalid and blocked issuing; it now reports valid when it unmounts, and no longer writes a ref during render. Claude-Session: https://claude.ai/code/session_01PZypiWDfMkDTeEPeXjRhW5
This commit is contained in:
@@ -67,7 +67,10 @@ impl NamingMode {
|
||||
/// Voiced line unit to ERPNext UOM. Whole-number UOMs such as "Nos" reject fractional quantities,
|
||||
/// which is why hours, minutes, kilometres and the like map to their own UOMs (see `units::KNOWN`).
|
||||
pub fn default_uom_map() -> BTreeMap<String, String> {
|
||||
crate::units::KNOWN.iter().map(|(id, uom)| (id.to_string(), uom.to_string())).collect()
|
||||
crate::units::KNOWN
|
||||
.iter()
|
||||
.map(|(id, uom)| (id.to_string(), uom.to_string()))
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Everything stored for the integration, secret included. Backend-only.
|
||||
|
||||
Reference in New Issue
Block a user