feat(ui): grupa „Knjigovodstvo" u sidebaru (Nivelacije, KIR, KPR, Obračun)

Kolapsibilni podmeni (isti obrazac kao Podešavanja); samostalni linkovi
Nivelacije i KIR/KPR/Obračun objedinjeni pod jednu grupu. Vidljivost:
KIR/KPR/Obračun po modulu pdv + dozvoli pdv.pregled, Nivelacije po
artikal.izmeni; grupa se prikazuje ako je bar jedno dete vidljivo.
This commit is contained in:
2026-06-14 09:52:09 +02:00
parent 0f1f65c7f7
commit a466f591b6
+34 -13
View File
@@ -39,14 +39,6 @@
<span class="nav-tooltip">Magacin</span> <span class="nav-tooltip">Magacin</span>
</a> </a>
{{if index .Dozvole "artikal.izmeni"}}
<a href="/nivelacije" class="nav-stavka {{if eq .Stranica "nivelacije"}}aktivan{{end}}">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="20" x2="12" y2="10"/><line x1="18" y1="20" x2="18" y2="4"/><line x1="6" y1="20" x2="6" y2="16"/></svg>
<span>Nivelacije</span>
<span class="nav-tooltip">Nivelacije — promene cena</span>
</a>
{{end}}
{{if index .Dozvole "nabavka.pregled"}} {{if index .Dozvole "nabavka.pregled"}}
<a href="/nabavke" class="nav-stavka {{if eq .Stranica "nabavke"}}aktivan{{end}}"> <a href="/nabavke" class="nav-stavka {{if eq .Stranica "nabavke"}}aktivan{{end}}">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
@@ -101,24 +93,53 @@
</a> </a>
{{end}} {{end}}
{{/* PDV evidencija — vidljivo samo kada je modul „pdv" uključen za firmu (profil firme) i korisnik ima dozvolu */}} {{/* Knjigovodstvo — grupa: KIR/KPR/Obračun (modul „pdv") + Nivelacije (dozvola izmene cena) */}}
{{if and (index .Moduli "pdv") (index .Dozvole "pdv.pregled")}} {{$pdvVid := and (index .Moduli "pdv") (index .Dozvole "pdv.pregled")}}
<a href="/pdv/kir" class="nav-stavka {{if eq .Stranica "pdv-kir"}}aktivan{{end}}"> {{$knjVid := or $pdvVid (index .Dozvole "artikal.izmeni")}}
{{if $knjVid}}
{{$knjAktivan := or (eq .Stranica "nivelacije") (eq .Stranica "pdv-kir") (eq .Stranica "pdv-kpr") (eq .Stranica "pdv-obracun")}}
<div>
<button type="button" data-podmeni-dugme
class="nav-stavka {{if $knjAktivan}}aktivan{{end}}"
style="width:100%;background:none;border:none;cursor:pointer;">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>
<span>Knjigovodstvo</span>
<span class="nav-strelica">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
style="transition:transform 0.2s;transform:{{if $knjAktivan}}rotate(180deg){{else}}rotate(0deg){{end}}">
<polyline points="6 9 12 15 18 9"/>
</svg>
</span>
<span class="nav-tooltip">Knjigovodstvo</span>
</button>
<div class="nav-podmeni {{if $knjAktivan}}otvoren{{end}}">
{{if index .Dozvole "artikal.izmeni"}}
<a href="/nivelacije" class="nav-stavka nav-podstavka {{if eq .Stranica "nivelacije"}}aktivan{{end}}">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="20" x2="12" y2="10"/><line x1="18" y1="20" x2="18" y2="4"/><line x1="6" y1="20" x2="6" y2="16"/></svg>
<span>Nivelacije</span>
<span class="nav-tooltip">Nivelacije — promene cena</span>
</a>
{{end}}
{{if $pdvVid}}
<a href="/pdv/kir" class="nav-stavka nav-podstavka {{if eq .Stranica "pdv-kir"}}aktivan{{end}}">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>
<span>KIR</span> <span>KIR</span>
<span class="nav-tooltip">KIR — knjiga izdatih računa</span> <span class="nav-tooltip">KIR — knjiga izdatih računa</span>
</a> </a>
<a href="/pdv/kpr" class="nav-stavka {{if eq .Stranica "pdv-kpr"}}aktivan{{end}}"> <a href="/pdv/kpr" class="nav-stavka nav-podstavka {{if eq .Stranica "pdv-kpr"}}aktivan{{end}}">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="16" y2="17"/><polyline points="10 9 9 9 8 9"/></svg> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="16" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
<span>KPR</span> <span>KPR</span>
<span class="nav-tooltip">KPR — knjiga primljenih računa</span> <span class="nav-tooltip">KPR — knjiga primljenih računa</span>
</a> </a>
<a href="/pdv/obracun" class="nav-stavka {{if eq .Stranica "pdv-obracun"}}aktivan{{end}}"> <a href="/pdv/obracun" class="nav-stavka nav-podstavka {{if eq .Stranica "pdv-obracun"}}aktivan{{end}}">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="2" width="16" height="20" rx="2"/><line x1="8" y1="6" x2="16" y2="6"/><line x1="8" y1="10" x2="10" y2="10"/><line x1="14" y1="10" x2="16" y2="10"/><line x1="8" y1="14" x2="10" y2="14"/><line x1="14" y1="14" x2="16" y2="14"/><line x1="8" y1="18" x2="16" y2="18"/></svg> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="2" width="16" height="20" rx="2"/><line x1="8" y1="6" x2="16" y2="6"/><line x1="8" y1="10" x2="10" y2="10"/><line x1="14" y1="10" x2="16" y2="10"/><line x1="8" y1="14" x2="10" y2="14"/><line x1="14" y1="14" x2="16" y2="14"/><line x1="8" y1="18" x2="16" y2="18"/></svg>
<span>Obračun</span> <span>Obračun</span>
<span class="nav-tooltip">PDV obračun za period</span> <span class="nav-tooltip">PDV obračun za period</span>
</a> </a>
{{end}} {{end}}
</div>
</div>
{{end}}
<div class="nav-separator"></div> <div class="nav-separator"></div>
<div class="nav-oznaka">Nalog</div> <div class="nav-oznaka">Nalog</div>