adicionado 0 na escal de nota
This commit is contained in:
parent
0bbd04ee45
commit
e8ca410b94
8 changed files with 72 additions and 15 deletions
|
|
@ -7,7 +7,7 @@
|
|||
{{template "edit_block.html" .}}
|
||||
</div>
|
||||
{{else}}
|
||||
<p class="eli-nps-title">De 1 a 10, quanto você recomenda {{if .Reg.ProdutoNome}}{{.Reg.ProdutoNome}}{{else}}{{produtoLabel .Produto}}{{end}} para um amigo?</p>
|
||||
<p class="eli-nps-title">De 0 a 10, quanto você recomenda {{if .Reg.ProdutoNome}}{{.Reg.ProdutoNome}}{{else}}{{produtoLabel .Produto}}{{end}} para um amigo?</p>
|
||||
{{template "nota_block.html" .}}
|
||||
{{if .Reg.Nota}}
|
||||
{{template "justificativa_block.html" .}}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
.eli-nps-card{max-width:520px;margin:0 auto;padding:16px;}
|
||||
.eli-nps-title{font-size:18px;font-weight:700;margin:0 0 8px;}
|
||||
.eli-nps-sub{margin:0 0 12px;color:#444;font-size:14px;}
|
||||
.eli-nps-scale{display:grid;grid-template-columns:repeat(10,1fr);gap:8px;margin:12px 0;}
|
||||
.eli-nps-scale{display:grid;grid-template-columns:repeat(11,1fr);gap:8px;margin:12px 0;}
|
||||
/*
|
||||
Botões de nota (1–10) com escala vermelho → verde.
|
||||
Botões de nota (0–10) com escala vermelho → verde.
|
||||
Importante: a cor base é determinada pelo valor; quando selecionado,
|
||||
o botão ganha destaque (borda/sombra) mas mantém a cor.
|
||||
*/
|
||||
|
|
@ -48,12 +48,15 @@
|
|||
|
||||
/*
|
||||
Paleta por grupo:
|
||||
- 1 a 6: tons de vermelho
|
||||
- 0 a 6: tons de vermelho
|
||||
- 7 e 8: tons de amarelo
|
||||
- 9 e 10: tons de verde
|
||||
*/
|
||||
|
||||
/* 1–6 (vermelho) */
|
||||
/* 0–6 (vermelho) */
|
||||
.eli-nps-btn-0{background:#ffebee;border-color:#ffcdd2;}
|
||||
.eli-nps-btn-0:hover,.eli-nps-btn-0.eli-nps-btn-selected{background:#f44336;color:#fff;border-color:#f44336;}
|
||||
|
||||
.eli-nps-btn-1{background:#ffebee;border-color:#ffcdd2;}
|
||||
.eli-nps-btn-1:hover,.eli-nps-btn-1.eli-nps-btn-selected{background:#ef5350;color:#fff;border-color:#ef5350;}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{{define "nota_block.html"}}
|
||||
<div class="eli-nps-scale">
|
||||
{{range $i := seq 1 10}}
|
||||
{{range $i := seq 0 10}}
|
||||
<button
|
||||
class="eli-nps-btn eli-nps-btn-{{$i}} {{if noteEq $.Reg.Nota $i}}eli-nps-btn-selected{{end}}"
|
||||
hx-patch="/api/e-li.nps/{{$.Produto}}/{{$.ID}}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue