Skip to content

Instantly share code, notes, and snippets.

val colsFmt = Seq(
ValCol(col = 1, field = "cve_oficina", title = "Cve. Oficina", styleTitle = Seq(width := "50px"), styleCell = Seq(textAlign := "center")),
ValCol(col = 2, field = "ejercicio", title = "Ejercicio", styleTitle = Seq(width := "70px"), styleCell = Seq(textAlign := "center")),
ValCol(col = 3, field = "folio", title = "Folio Partida", styleTitle = Seq(width := "50px"), styleCell = Seq(textAlign := "center")),
ValCol(col = 4, field = "renglon", title = "Renglon", styleTitle = Seq(width := "50px"), styleCell = Seq(textAlign := "center")),
ValCol(col = 5, field = "partida", title = "Partida", styleTitle = Seq(width := "70px"), styleCell = Seq(textAlign := "center")),
ValCol(col = 6, field = "descripcion_partida", title = "Descripcion Partida", styleTitle = Seq(width := "50px"), styleCell = Seq(textAlign := "center")),
ValCol(col = 7, field = "cve_articulo", title = "Cve Articulo", styleTitle = Seq(width := "50px"), styleCell = Seq( contentEditable:=true, textAlig
package manik1.modules.lstBienesStore
import outwatch.util.Store
import monix.execution.Scheduler.Implicits.global
import shapeless.Generic
import spatutorial.shared.{Articulo, DatosGralesPedido, LstItems, Renglon}
/***********************************************************/
import boopickle.Default._
import mycelium.client._
val reduce: (AppState, ActionsStore) => (AppState, Observable[ActionsStore]) = (s, a) => a match {
case CleanStore => (s.copy(lstBienes = LstItems()), Observable.empty)
case UpdateLstItems(lst) =>
(s.copy(lstBienes = lst), Observable.empty)
case InsertItem(item) =>
println("Insertando una fila en el store del LstBienesStore !!!!!!!!!!!!!!!!!!!!")
val newItems: Seq[Renglon] = s.lstBienes.items ++ Seq(item)
(s.copy(lstBienes = s.lstBienes.copy(items = newItems), rowActive = item), Observable.empty )
case UpdateItem(renglon) =>
object Menu {
trait Page
case object Pedido extends Page
case object Comparativo extends Page
case object Home extends Page
case object Notfound extends Page
case object Help extends Page
val hashRouter = Handler.create[Page](Home).unsafeRunSync()
val onChoiceItem = SinkObserver.create[ ( String, String ) ]{ case ( id, description ) =>
grid.hdlRowActive.foreach { idx =>
store.store.onNext (
store.UpdateIdx(idx, Tenderer (id_comparative = "100-2019-ADQ2",key_provider = id, business_name = Some(description)))
)
}
hdlCatalog.onNext(Seq.empty)
Continue
}
val gridCatalog = new GridCatalogs()
val onChoiceItem = SinkObserver.create[ ( String, String ) ]{ case ( id, description ) =>
grid.hdlRowActive.foreach { idx =>
store.store.onNext (
store.UpdateIdx(idx, Tenderer (id_comparative = "100-2019-ADQ2",key_provider = id, business_name = Some(description)))
)
}
hdlCatalog.onNext(Seq.empty)
Continue
class FrmInvitationToTender {
val gridCatalog = new GridCatalogs()
val onChoiceItem = SinkObserver.create[ ( String, String ) ]{ case ( id, description ) =>
grid.hdlRowActive.foreach { idx =>
store.store.onNext (
store.UpdateIdx(idx, Tenderer (id_comparative = "100-2019-ADQ2",key_provider = id, business_name = Some(description)))
)
}
hdlCatalog.onNext(Seq.empty)
def cmpInput444(lbl: String, hdl: Handler[String], props: VDomModifier, events: VDomModifier) =
div( id := "txt" + lbl,
float.left, props,
label( lbl, props ),
input ( key := "txt" + lbl,
value <-- hdl.map ( t => if(t == "0") "" else t ),
onKeyUp.map { k =>
val txt = k.currentTarget.asInstanceOf[html.Input]
if(txt.value == "") "0" else txt.value
} --> hdl,
package manik1.modules.lstBienesStore
import manik1.services.WSCovenant
import outwatch.ext.monix.util._
import monix.execution.Scheduler.Implicits.global
import monix.reactive.Observable
import spatutorial.shared.{LstItems, QryRenglon, Renglon}
import cats.effect.IO
/***********************************************************/
def render = Observable (
div ( id := "pageForm",
connectOtherComponents,
div( cls := "groupControls",
div(
cmpInput4("Ejercicio", hdlEjercicio.mapHandler[String](_.toInt){ f: Int => if (f <= 0) "" else f.toString},
VDomModifier(width:="35px", marginRight:="30px", textAlign:="center"),
VDomModifier.empty ),
cmpInput4(
"Folio",