⎇ 6facc3c8ed901d441e45bc052eadd6bbd2c668f5
examples/nakui-modules/suppliers/module.json
Ñawpa willay
ch'uya
feat(nakui): metainterfaz declarativa + 6 modulos ERP estandar
1{
2 "id": "suppliers",
3 "label": "Proveedores",
4 "description": "Proveedores que abastecen el catálogo.",
5 "entities": [
6 {
7 "name": "supplier",
8 "label": "Proveedor",
9 "fields": [
10 { "name": "name", "label": "Razón social", "kind": "text", "required": true },
11 { "name": "tax_id", "label": "ID fiscal", "kind": "text", "required": true, "help": "RUT/RFC/NIT/EIN según país" },
12 { "name": "contact", "label": "Contacto", "kind": "text" },
13 { "name": "email", "label": "Email", "kind": "text" },
14 { "name": "phone", "label": "Teléfono", "kind": "text" },
15 { "name": "payment_terms_days", "label": "Términos de pago (días)", "kind": "number", "default": "30" },
16 { "name": "active", "label": "Activo", "kind": "boolean", "default": "true" }
17 ]
18 }
19 ],
20 "menu": [
21 { "label": "Listar", "view": "list", "icon": "🏭" },
22 { "label": "Nuevo", "view": "form", "icon": "✚" }
23 ],
24 "views": {
25 "list": {
26 "kind": "list",
27 "title": "Proveedores",
28 "entity": "supplier",
29 "columns": [
30 { "field": "name", "label": "Razón social", "weight": 2.5 },
31 { "field": "tax_id", "label": "ID fiscal", "weight": 1.2 },
32 { "field": "contact", "label": "Contacto", "weight": 1.5 },
33 { "field": "email", "label": "Email", "weight": 2.0 },
34 { "field": "payment_terms_days", "label": "Términos", "weight": 0.8 },
35 { "field": "active", "label": "Activo", "weight": 0.5 }
36 ],
37 "actions": [
38 { "kind": "open_view", "view": "form", "label": "✚ Nuevo" }
39 ],
40 "search_in": ["name", "tax_id", "contact", "email"]
41 },
42 "form": {
43 "kind": "form",
44 "title": "Nuevo proveedor",
45 "entity": "supplier",
46 "fields": [
47 { "name": "name", "label": "Razón social", "kind": "text", "required": true },
48 { "name": "tax_id", "label": "ID fiscal", "kind": "text", "required": true },
49 { "name": "contact", "label": "Persona de contacto", "kind": "text" },
50 { "name": "email", "label": "Email", "kind": "text" },
51 { "name": "phone", "label": "Teléfono", "kind": "text" },
52 { "name": "payment_terms_days", "label": "Términos de pago (días)", "kind": "number", "default": "30" },
53 { "name": "active", "label": "Activo", "kind": "boolean", "default": "true" }
54 ],
55 "on_submit": {
56 "kind": "seed_entity",
57 "entity": "supplier",
58 "next_view": "list"
59 }
60 }
61 }
62}