Compare commits
No commits in common. "992bbf32a9fb3b7807cca4967e78214c003ddb27" and "79ec3ae4d687e79d3239bcb2217abff89012dc45" have entirely different histories.
992bbf32a9
...
79ec3ae4d6
|
@ -374,15 +374,15 @@ input.width-2x {
|
||||||
color: var(--numerus--color--red);
|
color: var(--numerus--color--red);
|
||||||
}
|
}
|
||||||
|
|
||||||
[lang="en"] form:not(.filters) textarea:not([required]) + label::after,
|
[lang="en"] textarea:not([required]) + label::after,
|
||||||
[lang="en"] form:not(.filters) input:not([required]) + label::after,
|
[lang="en"] input:not([required]) + label::after,
|
||||||
[lang="en"] form:not(.filters) select:not([required]) + label::after {
|
[lang="en"] select:not([required]) + label::after {
|
||||||
content: " (optional)"
|
content: " (optional)"
|
||||||
}
|
}
|
||||||
|
|
||||||
[lang="ca"] form:not(.filters) textarea:not([required]) + label::after, [lang="es"] form:not(.filters) textarea:not([required]) + label::after,
|
[lang="ca"] textarea:not([required]) + label::after, [lang="es"] textarea:not([required]) + label::after,
|
||||||
[lang="ca"] form:not(.filters) input:not([required]) + label::after, [lang="es"] form:not(.filters) input:not([required]) + label::after,
|
[lang="ca"] input:not([required]) + label::after, [lang="es"] input:not([required]) + label::after,
|
||||||
[lang="ca"] form:not(.filters) select:not([required]) + label::after, [lang="es"] form:not(.filters) select:not([required]) + label::after {
|
[lang="ca"] select:not([required]) + label::after, [lang="es"] select:not([required]) + label::after {
|
||||||
content: " (opcional)"
|
content: " (opcional)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ main > nav {
|
||||||
|
|
||||||
.invoice-data, .product-data, .expenses-data {
|
.invoice-data, .product-data, .expenses-data {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4 , 1fr);
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -909,21 +909,13 @@ div[x-data="snackbar"] div[role="alert"].enter.end, div[x-data="snackbar"] div[r
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Filters */
|
/* Dashboard */
|
||||||
.filters {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.filters-visible .filters {
|
.filters {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filters-visible #filters-toggle {
|
|
||||||
background-color: var(--numerus--header--background-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dashboard */
|
|
||||||
#dashboard-filters {
|
#dashboard-filters {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -712,8 +712,6 @@ htmx.on('closeModal', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
htmx.on(document, 'alpine:init', () => {
|
htmx.on(document, 'alpine:init', () => {
|
||||||
document.body.classList.remove('show-filters');
|
|
||||||
|
|
||||||
Alpine.data('snackbar', () => ({
|
Alpine.data('snackbar', () => ({
|
||||||
show: false, toast: "", toasts: [], timeoutId: null, init() {
|
show: false, toast: "", toasts: [], timeoutId: null, init() {
|
||||||
htmx.on('htmx:error', (error) => {
|
htmx.on('htmx:error', (error) => {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<script type="module" src="/static/numerus.js"></script>
|
<script type="module" src="/static/numerus.js"></script>
|
||||||
<script defer src="/static/alpinejs@3.12.0.min.js"></script>
|
<script defer src="/static/alpinejs@3.12.0.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="show-filters">
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1><img src="/static/numerus.svg" alt="Numerus" width="261" height="33"></h1>
|
<h1><img src="/static/numerus.svg" alt="Numerus" width="261" height="33"></h1>
|
||||||
<details id="profile-menu" class="menu">
|
<details id="profile-menu" class="menu">
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
<a>{{( pgettext "Contacts" "title" )}}</a>
|
<a>{{( pgettext "Contacts" "title" )}}</a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ template "filters-toggle" }}
|
|
||||||
<a class="primary button"
|
<a class="primary button"
|
||||||
href="{{ companyURI "/contacts/new" }}">{{( pgettext "New contact" "action" )}}</a>
|
href="{{ companyURI "/contacts/new" }}">{{( pgettext "New contact" "action" )}}</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -19,11 +18,11 @@
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.ContactsIndexPage*/ -}}
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.ContactsIndexPage*/ -}}
|
||||||
|
<div aria-label="{{( pgettext "Filters" "title" )}}">
|
||||||
<form class="filters" method="GET" action="{{ companyURI "/contacts"}}"
|
<form class="filters" method="GET" action="{{ companyURI "/contacts"}}"
|
||||||
data-hx-target="main"
|
data-hx-target="main"
|
||||||
data-hx-boost="true"
|
data-hx-boost="true"
|
||||||
data-hx-trigger="change,search,submit"
|
data-hx-trigger="change,search,submit"
|
||||||
aria-labelledby="filters-toggle"
|
|
||||||
>
|
>
|
||||||
{{ with .Filters }}
|
{{ with .Filters }}
|
||||||
{{ template "input-field" .Name }}
|
{{ template "input-field" .Name }}
|
||||||
|
@ -34,6 +33,7 @@
|
||||||
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
|
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
|
||||||
</noscript>
|
</noscript>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
<a>{{( pgettext "Expenses" "title" )}}</a>
|
<a>{{( pgettext "Expenses" "title" )}}</a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ template "filters-toggle" }}
|
|
||||||
<a class="primary button"
|
<a class="primary button"
|
||||||
href="{{ companyURI "/expenses/new" }}">{{( pgettext "New expense" "action" )}}</a>
|
href="{{ companyURI "/expenses/new" }}">{{( pgettext "New expense" "action" )}}</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -20,9 +19,9 @@
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.expensesIndexPage*/ -}}
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.expensesIndexPage*/ -}}
|
||||||
|
<div aria-label="{{( pgettext "Filters" "title" )}}">
|
||||||
<form class="filters" method="GET" action="{{ companyURI "/expenses"}}"
|
<form class="filters" method="GET" action="{{ companyURI "/expenses"}}"
|
||||||
data-hx-target="main" data-hx-boost="true" data-hx-trigger="change,search,submit"
|
data-hx-target="main" data-hx-boost="true" data-hx-trigger="change,search,submit"
|
||||||
aria-labelledby="filters-toggle"
|
|
||||||
>
|
>
|
||||||
{{ with .Filters }}
|
{{ with .Filters }}
|
||||||
{{ template "select-field" .Customer }}
|
{{ template "select-field" .Customer }}
|
||||||
|
@ -36,6 +35,7 @@
|
||||||
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
|
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
|
||||||
</noscript>
|
</noscript>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -159,9 +159,3 @@
|
||||||
{{ template "select-field" .Tax }}
|
{{ template "select-field" .Tax }}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ define "filters-toggle" -}}
|
|
||||||
<button id="filters-toggle" x-cloak x-data="{}"
|
|
||||||
@click="document.body.classList.toggle('filters-visible')"
|
|
||||||
type="button">{{(pgettext "Filters" "action")}}</button>
|
|
||||||
{{- end }}
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
<form id="batch-form" action="{{ companyURI "/invoices/batch" }}" method="post">
|
<form id="batch-form" action="{{ companyURI "/invoices/batch" }}" method="post">
|
||||||
{{ csrfToken }}
|
{{ csrfToken }}
|
||||||
<p>
|
<p>
|
||||||
{{ template "filters-toggle" }}
|
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
name="action" value="download"
|
name="action" value="download"
|
||||||
>{{( pgettext "Download invoices" "action" )}}</button>
|
>{{( pgettext "Download invoices" "action" )}}</button>
|
||||||
|
@ -26,10 +25,9 @@
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.InvoicesIndexPage*/ -}}
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.InvoicesIndexPage*/ -}}
|
||||||
<form class="filters" method="GET" action="{{ companyURI "/invoices"}}"
|
<div aria-label="{{( pgettext "Filters" "title" )}}">
|
||||||
data-hx-target="main" data-hx-boost="true" data-hx-trigger="change,search,submit"
|
<form class="filters" method="GET" action="{{ companyURI "/invoices"}}" data-hx-target="main" data-hx-boost="true"
|
||||||
aria-labelledby="filters-toggle"
|
data-hx-trigger="change,search,submit">
|
||||||
>
|
|
||||||
{{ with .Filters }}
|
{{ with .Filters }}
|
||||||
{{ template "select-field" .Customer }}
|
{{ template "select-field" .Customer }}
|
||||||
{{ template "select-field" .InvoiceStatus }}
|
{{ template "select-field" .InvoiceStatus }}
|
||||||
|
@ -43,6 +41,7 @@
|
||||||
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
|
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
|
||||||
</noscript>
|
</noscript>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<table id="invoice-list">
|
<table id="invoice-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
<a>{{( pgettext "Products" "title" )}}</a>
|
<a>{{( pgettext "Products" "title" )}}</a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ template "filters-toggle" }}
|
|
||||||
<a class="primary button"
|
<a class="primary button"
|
||||||
href="{{ companyURI "/products/new" }}">{{( pgettext "New product" "action" )}}</a>
|
href="{{ companyURI "/products/new" }}">{{( pgettext "New product" "action" )}}</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -19,11 +18,11 @@
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.productsIndexPage*/ -}}
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.productsIndexPage*/ -}}
|
||||||
|
<div aria-label="{{( pgettext "Filters" "title" )}}">
|
||||||
<form class="filters" method="GET" action="{{ companyURI "/products"}}"
|
<form class="filters" method="GET" action="{{ companyURI "/products"}}"
|
||||||
data-hx-target="main"
|
data-hx-target="main"
|
||||||
data-hx-boost="true"
|
data-hx-boost="true"
|
||||||
data-hx-trigger="change,search,submit"
|
data-hx-trigger="change,search,submit"
|
||||||
aria-labelledby="filters-toggle"
|
|
||||||
>
|
>
|
||||||
{{ with .Filters }}
|
{{ with .Filters }}
|
||||||
{{ template "input-field" .Name }}
|
{{ template "input-field" .Name }}
|
||||||
|
@ -34,6 +33,7 @@
|
||||||
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
|
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
|
||||||
</noscript>
|
</noscript>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue