- Uusi catalog-moduuli: palveluyksikkö → (palvelu) → työtehtävä ilman hintoja. - Pohjatiedot-sivu /catalog/ pääkäyttäjälle ja johdolle (oikeus catalog.manage): lisäys ja muokkaus dialogissa, Siirrä ylös / Siirrä alas, käytöstä poisto ja käyttöön otto. Fokus ja aria-live-ilmoitus jokaisen muutoksen jälkeen. - Rivejä ei poisteta. Käytöstä poistetun yläkohdan alla olevat rivit säilyttävät oman tilansa, mutta eivät ole valittavissa. Nimi on yksilöllinen samalla tasolla kirjainkoosta riippumatta. - Työtehtävän voi siirtää saman yksikön toiseen palveluun tai suoraan yksikön alle. - Luvun 11.1 lista data-migraationa (0002_seed), jos taulut ovat tyhjiä. - CatalogQueries: work_type_options, active_service_units ja get_work_type tehtäviä ja tuntikirjausta varten. - Import-linter-sopimukset, suomennokset, yksikkö-, integraatio- ja selaintestit. - Päivitetty CLAUDE.md ja määrittelyn kohta 16.3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
84 lines
4.8 KiB
HTML
84 lines
4.8 KiB
HTML
{% load static i18n users_tags %}<!DOCTYPE html>
|
||
{% get_current_language as LANGUAGE_CODE %}
|
||
<html lang="{{ LANGUAGE_CODE }}">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>{% block title %}{% endblock %} – Toiminnanohjaus</title>
|
||
<script>
|
||
(function () {
|
||
var t = localStorage.getItem("theme");
|
||
if (t) document.documentElement.setAttribute("data-theme", t);
|
||
})();
|
||
</script>
|
||
<link rel="stylesheet" href="{% static 'dist/app.css' %}">
|
||
<script src="{% static 'dist/htmx.min.js' %}" defer></script>
|
||
<script src="{% static 'dist/alpine.min.js' %}" defer></script>
|
||
<script src="{% static 'src/app.js' %}" defer></script>
|
||
</head>
|
||
<body class="min-h-screen bg-base-200" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
|
||
<a href="#main" class="sr-only focus:not-sr-only focus:absolute focus:z-50 focus:m-2 btn btn-primary">{% translate "Skip to content" %}</a>
|
||
{% block layout %}
|
||
<div class="drawer lg:drawer-open" x-data="{ open: false }" @keydown.escape.window="open = false">
|
||
<input id="nav-drawer" type="checkbox" class="drawer-toggle" x-model="open" tabindex="-1" aria-hidden="true">
|
||
<div class="drawer-content flex flex-col">
|
||
<header class="navbar bg-base-100 border-b border-base-300 gap-2">
|
||
<button type="button" class="btn btn-ghost lg:hidden" aria-controls="main-nav" :aria-expanded="open.toString()"
|
||
@click="open = !open; $nextTick(() => { if (open) $refs.nav.querySelector('a').focus() })">
|
||
<span class="sr-only">{% translate "Open menu" %}</span>
|
||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
|
||
</button>
|
||
<a href="{% url 'home' %}" class="text-lg font-semibold px-2 truncate min-w-0">Toiminnanohjaus</a>
|
||
<div class="flex-1"></div>
|
||
<div class="hidden sm:block">{% include "components/theme_toggle.html" %}</div>
|
||
<div class="dropdown dropdown-end hidden sm:block">
|
||
<button type="button" class="btn btn-ghost" aria-haspopup="true">{{ request.user.name }}</button>
|
||
<ul class="dropdown-content menu bg-base-100 rounded-box shadow z-10 w-56 p-2">
|
||
<li>
|
||
<form method="post" action="{% url 'users:logout' %}">
|
||
{% csrf_token %}
|
||
<button type="submit" class="w-full text-left">{% translate "Log out" %}</button>
|
||
</form>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</header>
|
||
<main id="main" tabindex="-1" class="p-4 lg:p-6 max-w-7xl w-full">
|
||
{% include "components/messages.html" %}
|
||
{% block content %}{% endblock %}
|
||
</main>
|
||
</div>
|
||
<div class="drawer-side z-20">
|
||
<label for="nav-drawer" class="drawer-overlay" aria-hidden="true"></label>
|
||
<nav id="main-nav" x-ref="nav" aria-label="{% translate 'Main menu' %}" class="bg-base-100 min-h-full w-64 border-r border-base-300">
|
||
<ul class="menu w-full p-4 gap-1">
|
||
<li><a href="{% url 'home' %}" {% if request.resolver_match.url_name == 'home' %}aria-current="page" class="menu-active"{% endif %}>{% translate "Home" %}</a></li>
|
||
{% if request.user|can:"customers.use" %}
|
||
<li><a href="{% url 'customers:list' %}" {% if request.resolver_match.app_name == 'customers' %}aria-current="page" class="menu-active"{% endif %}>{% translate "Customers" %}</a></li>
|
||
{% endif %}
|
||
{% if request.user|can:"users.manage" or request.user|can:"catalog.manage" %}
|
||
<li class="menu-title">{% translate "Administration" %}</li>
|
||
{% endif %}
|
||
{% if request.user|can:"catalog.manage" %}
|
||
<li><a href="{% url 'catalog:index' %}" {% if request.resolver_match.app_name == 'catalog' %}aria-current="page" class="menu-active"{% endif %}>{% translate "Base data" %}</a></li>
|
||
{% endif %}
|
||
{% if request.user|can:"users.manage" %}
|
||
<li><a href="{% url 'users:list' %}" {% if request.resolver_match.app_name == 'users' %}aria-current="page" class="menu-active"{% endif %}>{% translate "Users" %}</a></li>
|
||
{% endif %}
|
||
</ul>
|
||
<div class="sm:hidden border-t border-base-300 p-4 space-y-2">
|
||
<p class="font-semibold">{{ request.user.name }}</p>
|
||
{% include "components/theme_toggle.html" %}
|
||
<form method="post" action="{% url 'users:logout' %}">
|
||
{% csrf_token %}
|
||
<button type="submit" class="btn btn-ghost btn-sm">{% translate "Log out" %}</button>
|
||
</form>
|
||
</div>
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
{% endblock %}
|
||
<div id="live-region" class="sr-only" role="status" aria-live="polite" aria-atomic="true"></div>
|
||
</body>
|
||
</html>
|