File size: 3,479 Bytes
7d0c16f b647e89 7d0c16f b647e89 7d0c16f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
{% extends "base.html.j2" %}
{% import "components.html.j2" as ui %}
{% block content %}
<header class="doc-header">
<h1>Suitelet 路 {{ doc.metadata.description or doc.metadata.script_type }}</h1>
<p class="doc-header-meta">
SuiteScript {{ doc.metadata.suitescript_version or "N/D" }}
</p>
<p class="muted">Procesos de UI y rutas Suitelet.</p>
</header>
{{ ui.metadata_block(doc.metadata) }}
{{ ui.summary_block(doc.summary) }}
{# ------------------------ FLUJO GET/POST ------------------------ #}
{% if doc.flow %}
<div class="section">
<h2>Flujo de Ejecuci贸n</h2>
{% if doc.flow.get %}
<h3>GET</h3>
<p>{{ doc.flow.get }}</p>
{% endif %}
{% if doc.flow.post %}
<h3>POST</h3>
<p>{{ doc.flow.post }}</p>
{% endif %}
</div>
{% endif %}
{# ------------------------ ENTRADAS (inputs) ------------------------ #}
{% if doc.inputs %}
{{ ui.table_block("Par谩metros GET", doc.inputs.get_parameters, [
{"field": "name", "title": "Nombre"},
{"field": "description", "title": "Descripci贸n"},
{"field": "type", "title": "Tipo"}
]) }}
{{ ui.table_block("Par谩metros POST", doc.inputs.post_parameters, [
{"field": "name", "title": "Nombre"},
{"field": "description", "title": "Descripci贸n"},
{"field": "validation", "title": "Validaci贸n"}
]) }}
{# doc.inputs.validations es una lista de objetos { parameter, validation_rule } #}
{{ ui.table_block("Validaciones", doc.inputs.validations, [
{"field": "parameter", "title": "Par谩metro"},
{"field": "validation_rule", "title": "Regla de validaci贸n"}
]) }}
{% endif %}
{# ------------------------ FORMULARIO ------------------------ #}
{% if doc.form %}
{{ ui.table_block("Campos del formulario", doc.form.fields, [
{"field": "id", "title": "ID"},
{"field": "label", "title": "Etiqueta"},
{"field": "type", "title": "Tipo"},
{"field": "default_value", "title": "Valor por defecto"}
]) }}
{{ ui.table_block("Grupos de campos", doc.form.field_groups, [
{"field": "id", "title": "ID"},
{"field": "label", "title": "Etiqueta"},
{"field": "fields", "title": "Campos"}
]) }}
{{ ui.table_block("Botones", doc.form.buttons, [
{"field": "label", "title": "Etiqueta"},
{"field": "type", "title": "Tipo"}
]) }}
{% endif %}
{# ------------------------ L脫GICA ------------------------ #}
{% if doc.logic %}
{{ ui.table_block("B煤squedas", doc.logic.searches, [
{"field": "type", "title": "Tipo"},
{"field": "filters", "title": "Filtros"},
{"field": "columns", "title": "Columnas"},
{"field": "limit", "title": "L铆mite"}
]) }}
{# record_operations es una lista de strings: usar list_block #}
{{ ui.list_block("Operaciones con registros", doc.logic.record_operations) }}
{{ ui.list_block("Side effects", doc.logic.side_effects) }}
{% endif %}
{# ------------------------ ERRORES ------------------------ #}
{% if doc.errors is mapping %}
{# explicit_checks: lista de strings, no de objetos #}
{{ ui.list_block("Chequeos expl铆citos", doc.errors.explicit_checks) }}
{{ ui.list_block("Manejo de excepciones", doc.errors.exception_handling) }}
{% else %}
{# fallback por si alg煤n d铆a errors viene como lista simple #}
{{ ui.list_block("Errores", doc.errors) }}
{% endif %}
{% endblock %}
|