Skip to content

Instantly share code, notes, and snippets.

@cristhian-net
Created May 16, 2017 01:04
Show Gist options
  • Save cristhian-net/e90055832906352897122e0f268e5b38 to your computer and use it in GitHub Desktop.
Save cristhian-net/e90055832906352897122e0f268e5b38 to your computer and use it in GitHub Desktop.
<template>
<section>
<h2>${heading}</h2>
<ux-form>
<ux-field label="Nombre">
<ux-input type="text" value.bind="producto.Nombre & validate"></ux-input>
</ux-field>
<ux-field label="Categoría">
</ux-field>
<select value.bind="producto.CategoriaId" change.delegate="checkCategoriaById()">
<option repeat.for="categoria of categorias" model.bind="categoria.CategoriaProductoId">${categoria.Nombre}</option>
</select>
<div if.bind="esProduccion">
<ux-field label="Materia Prima">
</ux-field>
<select value.bind="producto.MateriaPrimaId">
<option model.bind="">Seleccionar materia prima</option>
<option repeat.for="materia of materiaPrima" model.bind="materia.MateriaPrimaId">${materia.Nombre}</option>
</select>
</div>
<ux-field label="Precio Sugerido">
<ux-input type="number" value.bind="producto.Precio"></ux-input>
</ux-field>
<ux-button click.delegate="agregarProducto()">Agregar Producto</ux-button>
</ux-form>
</section>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment