Moved the link to edit expense from the invoicer’s name to a menu

This menu will also have options like delete, and whatever we like to do
to expenses, like invoices do.
This commit is contained in:
jordi fita mas 2023-05-06 11:08:21 +02:00
parent 49c41681ce
commit 1415c3ef10
3 changed files with 74 additions and 46 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: numerus\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
"POT-Creation-Date: 2023-05-03 12:40+0200\n"
"POT-Creation-Date: 2023-05-06 11:03+0200\n"
"PO-Revision-Date: 2023-01-18 17:08+0100\n"
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
@ -49,7 +49,7 @@ msgid "New Invoice"
msgstr "Nova factura"
#: web/template/invoices/products.gohtml:48
#: web/template/expenses/index.gohtml:25 web/template/products/index.gohtml:38
#: web/template/products/index.gohtml:38
msgctxt "product"
msgid "All"
msgstr "Tots"
@ -135,12 +135,12 @@ msgid "Status"
msgstr "Estat"
#: web/template/invoices/index.gohtml:51 web/template/contacts/index.gohtml:28
#: web/template/products/index.gohtml:40
#: web/template/expenses/index.gohtml:29 web/template/products/index.gohtml:40
msgctxt "title"
msgid "Tags"
msgstr "Etiquetes"
#: web/template/invoices/index.gohtml:52 web/template/expenses/index.gohtml:29
#: web/template/invoices/index.gohtml:52 web/template/expenses/index.gohtml:30
msgctxt "title"
msgid "Amount"
msgstr "Import"
@ -150,7 +150,7 @@ msgctxt "title"
msgid "Download"
msgstr "Descàrrega"
#: web/template/invoices/index.gohtml:54
#: web/template/invoices/index.gohtml:54 web/template/expenses/index.gohtml:31
msgctxt "title"
msgid "Actions"
msgstr "Accions"
@ -161,6 +161,7 @@ msgid "Select invoice %v"
msgstr "Selecciona factura %v"
#: web/template/invoices/index.gohtml:116 web/template/invoices/view.gohtml:19
#: web/template/expenses/index.gohtml:58
msgctxt "action"
msgid "Edit"
msgstr "Edita"
@ -358,6 +359,11 @@ msgctxt "action"
msgid "New expense"
msgstr "Nova despesa"
#: web/template/expenses/index.gohtml:25
msgctxt "expense"
msgid "All"
msgstr "Totes"
#: web/template/expenses/index.gohtml:26
msgctxt "title"
msgid "Contact"
@ -373,7 +379,7 @@ msgctxt "title"
msgid "Invoice Number"
msgstr "Número de factura"
#: web/template/expenses/index.gohtml:52
#: web/template/expenses/index.gohtml:68
msgid "No expenses added yet."
msgstr "No hi ha cap despesa."
@ -512,74 +518,74 @@ msgstr "No podeu deixar la contrasenya en blanc."
msgid "Invalid user or password."
msgstr "Nom dusuari o contrasenya incorrectes."
#: pkg/products.go:161 pkg/products.go:260 pkg/invoices.go:776
#: pkg/products.go:164 pkg/products.go:263 pkg/invoices.go:776
msgctxt "input"
msgid "Name"
msgstr "Nom"
#: pkg/products.go:166 pkg/products.go:287 pkg/expenses.go:158
#: pkg/products.go:169 pkg/products.go:290 pkg/expenses.go:158
#: pkg/invoices.go:187 pkg/invoices.go:597 pkg/invoices.go:1042
#: pkg/contacts.go:256
msgctxt "input"
msgid "Tags"
msgstr "Etiquetes"
#: pkg/products.go:170 pkg/invoices.go:191
#: pkg/products.go:173 pkg/invoices.go:191
msgctxt "input"
msgid "Tags Condition"
msgstr "Condició de les etiquetes"
#: pkg/products.go:174 pkg/invoices.go:195
#: pkg/products.go:177 pkg/invoices.go:195
msgctxt "tag condition"
msgid "All"
msgstr "Totes"
#: pkg/products.go:175 pkg/invoices.go:196
#: pkg/products.go:178 pkg/invoices.go:196
msgid "Invoices must have all the specified labels."
msgstr "Les factures han de tenir totes les etiquetes."
#: pkg/products.go:179 pkg/invoices.go:200
#: pkg/products.go:182 pkg/invoices.go:200
msgctxt "tag condition"
msgid "Any"
msgstr "Qualsevol"
#: pkg/products.go:180 pkg/invoices.go:201
#: pkg/products.go:183 pkg/invoices.go:201
msgid "Invoices must have at least one of the specified labels."
msgstr "Les factures han de tenir com a mínim una de les etiquetes."
#: pkg/products.go:266 pkg/invoices.go:790
#: pkg/products.go:269 pkg/invoices.go:790
msgctxt "input"
msgid "Description"
msgstr "Descripció"
#: pkg/products.go:271 pkg/invoices.go:794
#: pkg/products.go:274 pkg/invoices.go:794
msgctxt "input"
msgid "Price"
msgstr "Preu"
#: pkg/products.go:281 pkg/expenses.go:142 pkg/invoices.go:823
#: pkg/products.go:284 pkg/expenses.go:142 pkg/invoices.go:823
msgctxt "input"
msgid "Taxes"
msgstr "Imposts"
#: pkg/products.go:306 pkg/profile.go:92 pkg/invoices.go:867
#: pkg/products.go:309 pkg/profile.go:92 pkg/invoices.go:867
msgid "Name can not be empty."
msgstr "No podeu deixar el nom en blanc."
#: pkg/products.go:307 pkg/invoices.go:868
#: pkg/products.go:310 pkg/invoices.go:868
msgid "Price can not be empty."
msgstr "No podeu deixar el preu en blanc."
#: pkg/products.go:308 pkg/invoices.go:869
#: pkg/products.go:311 pkg/invoices.go:869
msgid "Price must be a number greater than zero."
msgstr "El preu ha de ser un número major a zero."
#: pkg/products.go:310 pkg/expenses.go:180 pkg/expenses.go:185
#: pkg/products.go:313 pkg/expenses.go:180 pkg/expenses.go:185
#: pkg/invoices.go:877
msgid "Selected tax is not valid."
msgstr "Heu seleccionat un impost que no és vàlid."
#: pkg/products.go:311 pkg/expenses.go:181 pkg/expenses.go:186
#: pkg/products.go:314 pkg/expenses.go:181 pkg/expenses.go:186
#: pkg/invoices.go:878
msgid "You can only select a tax of each class."
msgstr "Només podeu seleccionar un impost de cada classe."

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: numerus\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
"POT-Creation-Date: 2023-05-03 12:40+0200\n"
"POT-Creation-Date: 2023-05-06 11:03+0200\n"
"PO-Revision-Date: 2023-01-18 17:45+0100\n"
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
"Language-Team: Spanish <es@tp.org.es>\n"
@ -49,7 +49,7 @@ msgid "New Invoice"
msgstr "Nueva factura"
#: web/template/invoices/products.gohtml:48
#: web/template/expenses/index.gohtml:25 web/template/products/index.gohtml:38
#: web/template/products/index.gohtml:38
msgctxt "product"
msgid "All"
msgstr "Todos"
@ -135,12 +135,12 @@ msgid "Status"
msgstr "Estado"
#: web/template/invoices/index.gohtml:51 web/template/contacts/index.gohtml:28
#: web/template/products/index.gohtml:40
#: web/template/expenses/index.gohtml:29 web/template/products/index.gohtml:40
msgctxt "title"
msgid "Tags"
msgstr "Etiquetes"
#: web/template/invoices/index.gohtml:52 web/template/expenses/index.gohtml:29
#: web/template/invoices/index.gohtml:52 web/template/expenses/index.gohtml:30
msgctxt "title"
msgid "Amount"
msgstr "Importe"
@ -150,7 +150,7 @@ msgctxt "title"
msgid "Download"
msgstr "Descargar"
#: web/template/invoices/index.gohtml:54
#: web/template/invoices/index.gohtml:54 web/template/expenses/index.gohtml:31
msgctxt "title"
msgid "Actions"
msgstr "Acciones"
@ -161,6 +161,7 @@ msgid "Select invoice %v"
msgstr "Seleccionar factura %v"
#: web/template/invoices/index.gohtml:116 web/template/invoices/view.gohtml:19
#: web/template/expenses/index.gohtml:58
msgctxt "action"
msgid "Edit"
msgstr "Editar"
@ -358,6 +359,11 @@ msgctxt "action"
msgid "New expense"
msgstr "Nuevo gasto"
#: web/template/expenses/index.gohtml:25
msgctxt "expense"
msgid "All"
msgstr "Todos"
#: web/template/expenses/index.gohtml:26
msgctxt "title"
msgid "Contact"
@ -373,7 +379,7 @@ msgctxt "title"
msgid "Invoice Number"
msgstr "Número de factura"
#: web/template/expenses/index.gohtml:52
#: web/template/expenses/index.gohtml:68
msgid "No expenses added yet."
msgstr "No hay gastos."
@ -512,74 +518,74 @@ msgstr "No podéis dejar la contraseña en blanco."
msgid "Invalid user or password."
msgstr "Nombre de usuario o contraseña inválido."
#: pkg/products.go:161 pkg/products.go:260 pkg/invoices.go:776
#: pkg/products.go:164 pkg/products.go:263 pkg/invoices.go:776
msgctxt "input"
msgid "Name"
msgstr "Nombre"
#: pkg/products.go:166 pkg/products.go:287 pkg/expenses.go:158
#: pkg/products.go:169 pkg/products.go:290 pkg/expenses.go:158
#: pkg/invoices.go:187 pkg/invoices.go:597 pkg/invoices.go:1042
#: pkg/contacts.go:256
msgctxt "input"
msgid "Tags"
msgstr "Etiquetes"
#: pkg/products.go:170 pkg/invoices.go:191
#: pkg/products.go:173 pkg/invoices.go:191
msgctxt "input"
msgid "Tags Condition"
msgstr "Condición de las etiquetas"
#: pkg/products.go:174 pkg/invoices.go:195
#: pkg/products.go:177 pkg/invoices.go:195
msgctxt "tag condition"
msgid "All"
msgstr "Todas"
#: pkg/products.go:175 pkg/invoices.go:196
#: pkg/products.go:178 pkg/invoices.go:196
msgid "Invoices must have all the specified labels."
msgstr "Las facturas deben tener todas las etiquetas."
#: pkg/products.go:179 pkg/invoices.go:200
#: pkg/products.go:182 pkg/invoices.go:200
msgctxt "tag condition"
msgid "Any"
msgstr "Cualquiera"
#: pkg/products.go:180 pkg/invoices.go:201
#: pkg/products.go:183 pkg/invoices.go:201
msgid "Invoices must have at least one of the specified labels."
msgstr "Las facturas debent tener como mínimo una de las etiquetas."
#: pkg/products.go:266 pkg/invoices.go:790
#: pkg/products.go:269 pkg/invoices.go:790
msgctxt "input"
msgid "Description"
msgstr "Descripción"
#: pkg/products.go:271 pkg/invoices.go:794
#: pkg/products.go:274 pkg/invoices.go:794
msgctxt "input"
msgid "Price"
msgstr "Precio"
#: pkg/products.go:281 pkg/expenses.go:142 pkg/invoices.go:823
#: pkg/products.go:284 pkg/expenses.go:142 pkg/invoices.go:823
msgctxt "input"
msgid "Taxes"
msgstr "Impuestos"
#: pkg/products.go:306 pkg/profile.go:92 pkg/invoices.go:867
#: pkg/products.go:309 pkg/profile.go:92 pkg/invoices.go:867
msgid "Name can not be empty."
msgstr "No podéis dejar el nombre en blanco."
#: pkg/products.go:307 pkg/invoices.go:868
#: pkg/products.go:310 pkg/invoices.go:868
msgid "Price can not be empty."
msgstr "No podéis dejar el precio en blanco."
#: pkg/products.go:308 pkg/invoices.go:869
#: pkg/products.go:311 pkg/invoices.go:869
msgid "Price must be a number greater than zero."
msgstr "El precio tiene que ser un número mayor a cero."
#: pkg/products.go:310 pkg/expenses.go:180 pkg/expenses.go:185
#: pkg/products.go:313 pkg/expenses.go:180 pkg/expenses.go:185
#: pkg/invoices.go:877
msgid "Selected tax is not valid."
msgstr "Habéis escogido un impuesto que no es válido."
#: pkg/products.go:311 pkg/expenses.go:181 pkg/expenses.go:186
#: pkg/products.go:314 pkg/expenses.go:181 pkg/expenses.go:186
#: pkg/invoices.go:878
msgid "You can only select a tax of each class."
msgstr "Solo podéis escoger un impuesto de cada clase."

View File

@ -22,11 +22,13 @@
<table>
<thead>
<tr>
<th>{{( pgettext "All" "product" )}}</th>
<th>{{( pgettext "All" "expense" )}}</th>
<th>{{( pgettext "Contact" "title" )}}</th>
<th>{{( pgettext "Invoice Date" "title" )}}</th>
<th>{{( pgettext "Invoice Number" "title" )}}</th>
<th>{{( pgettext "Tags" "title" )}}</th>
<th>{{( pgettext "Amount" "title" )}}</th>
<th>{{( pgettext "Actions" "title" )}}</th>
</tr>
</thead>
<tbody>
@ -34,8 +36,7 @@
{{- range . }}
<tr>
<td></td>
<td><a href="{{ companyURI "/expenses/"}}{{ .Slug }}"
data-hx-target="main" data-hx-boost="true">{{ .InvoicerName }}</a></td>
<td>{{ .InvoicerName }}</td>
<td>{{ .InvoiceDate|formatDate }}</td>
<td>{{ .InvoiceNumber }}</td>
<td>
@ -45,11 +46,26 @@
{{- end }}
</td>
<td class="numeric">{{ .Amount | formatPrice }}</td>
<td class="actions">
<details class="menu">
<summary><i class="ri-more-line"></i></summary>
<ul role="menu" class="action-menu">
<li role="presentation">
<a role="menuitem" href="{{ companyURI "/expenses"}}/{{ .Slug }}"
data-hx-target="main" data-hx-boost="true"
>
<i class="ri-edit-line"></i>
{{( pgettext "Edit" "action" )}}
</a>
</li>
</ul>
</details>
</td>
</tr>
{{- end }}
{{ else }}
<tr>
<td colspan="5">{{( gettext "No expenses added yet." )}}</td>
<td colspan="7">{{( gettext "No expenses added yet." )}}</td>
</tr>
{{ end }}
</tbody>