feat(nakui): módulo crm — clientes, pipeline de ventas, interacciones
Módulo CRM declarativo (schema.ncl + nsmc.json + morfismos Rhai) con tres entities (Cliente, Oportunidad, Interaccion) y tres morfismos: abrir_oportunidad, mover_oportunidad (pipeline con validación de transiciones) y registrar_interaccion. crm_demo: demo realista de 18 eventos que —a diferencia de los otros demos— conserva el event log e imprime el comando de nakui-explorer, así el explorador muestra un CRM con cuerpo. tests/crm.rs: 8 tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ use std::path::{Path, PathBuf};
|
||||
|
||||
use nakui_core::executor::{ExecError, Executor};
|
||||
use nakui_core::store::{MemoryStore, Store};
|
||||
use serde_json::{Value, json};
|
||||
use serde_json::{json, Value};
|
||||
use uuid::Uuid;
|
||||
|
||||
fn workspace_root() -> PathBuf {
|
||||
@@ -95,10 +95,7 @@ fn sale_decreases_stock_and_increases_caja() {
|
||||
.expect("venta must be persisted");
|
||||
assert_eq!(venta.get("total").and_then(Value::as_i64), Some(500_000));
|
||||
assert_eq!(venta.get("cantidad").and_then(Value::as_i64), Some(100));
|
||||
assert_eq!(
|
||||
venta.get("currency").and_then(Value::as_str),
|
||||
Some("USD")
|
||||
);
|
||||
assert_eq!(venta.get("currency").and_then(Value::as_str), Some("USD"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user