Created
October 17, 2019 18:01
-
-
Save tiagoefmoraes/f455ed54064e99be3664c77632a85800 to your computer and use it in GitHub Desktop.
NFe*
This file contains 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
NFe* | |
Pendente* | |
transmitir -> Aguardando Autorização | |
Aguardando Autorização | |
autorizada -> Autorizada | |
erro -> Erro | |
volta -> Pendente | |
Autorizada | |
Erro |
This file contains 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
function render(model){ | |
console.log(model) | |
function addImage() { | |
if (model.active_states[0].image_url) { | |
return $("img", | |
{src: model.active_states[0].image_url, style: {heightx: "70%", margin: "0 auto"}}) | |
} else { | |
return "No image available." | |
} | |
} | |
let current_state_name = model.active_states[0].name; | |
return ( | |
<div style={{textAlign: "center"}}> | |
<h1 style={{color: "darkBlue"}}>{current_state_name}</h1> | |
<div style={{backgroundColor: "lightBlue"}} | |
onMouseEnter={() => {model.emit("transmitir")}} | |
onMouseLeave={() => {model.emit("volta")}} | |
>Nfe {current_state_name}</div> | |
{addImage()} | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment