This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//case class GralDataPedido(no_pedido: String, compra: String, ejercicio: Int, fecha_pedido: java.sql.Date) | |
//case class Fechas(fecha: String) | |
implicit val dateGet: Get[Date] = Get[Fechas].tmap{ case date => | |
val format = new SimpleDateFormat("yyyy-MM-dd") | |
val parsed = format.parse(date.fecha) | |
new java.sql.Date(parsed.getTime()) | |
} | |
implicit val datePut: Put[Date] = Put[Fechas].tcontramap{ case date => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Articulo ( id: String = "", descripcion: Option[String] = None, unidad: String = "", presentacion: Option[Int] = None, | |
unid_med_pres: Option[String] = None, partida: String = "", cabms: Option[String] = None, cb: Option[Boolean] = None, | |
iva: Option[Double] = None, baja: Option[Boolean] = None, retension_isr: Option[Double] = None ) extends Father | |
class FrmArticulo { | |
val articulo = Articulo() | |
val hdlArticulo = Handler.create[Articulo](articulo).unsafeRunSync() | |
hdlArticulo.onNext(articulo) | |
val hdlCveArticulo = hdlArticulo.lens[String](articulo)(_.id)((state, newState) => state.copy(id = newState)) | |
val cancelableCveArticulo = hdlCveArticulo.connect() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package outwatch_components | |
import cats.effect.SyncIO | |
import cats.implicits._ | |
import org.scalajs | |
import org.scalajs.dom | |
import org.scalajs.dom.ext.KeyCode | |
import org.scalajs.dom.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate(idComparative: String) = { | |
val generateOrders = new CDmlQuerys() | |
implicit val getCalcularResult = GetResult(r => Calcular(r.nextString, r.nextString, r.nextString, r.nextInt, r.nextDouble, r.nextBoolean)) | |
val calcular = sql"""select * from calccantpedid as c where c.id_comparativo = $idComparative""".as[Calcular] | |
val lstOrdersF = generateOrders.run(calcular) | |
val dataGralesProcess = new CGralDataProceso() | |
val datGralesProcess = dataGralesProcess.byId(idComparative) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
/***********************************************************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |