Bladeren bron

Separador de miles (de momento coma) y arreglos en estilo listar_cuentas

Celestino Rey 1 jaar geleden
bovenliggende
commit
793f11b5b9
5 gewijzigde bestanden met toevoegingen van 13 en 9 verwijderingen
  1. 1 1
      K8S/Makefile
  2. 1 1
      K8S/env-prod-configmap.yaml
  3. 1 0
      src/misfinanzas/settings.py
  4. 4 2
      src/templates/dashboard.html
  5. 6 5
      src/templates/listar_cuentas.html

+ 1 - 1
K8S/Makefile

@@ -1,6 +1,6 @@
 export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
 export REGISTRY=registry.reymota.es
-export IMG_VERSION = 0.18
+export IMG_VERSION = 0.26
 export IMG_NGINX_VERSION = 1.0
 
 # limpia todo

+ 1 - 1
K8S/env-prod-configmap.yaml

@@ -2,7 +2,7 @@ apiVersion: v1
 data:
   DEBUG: "False"
   ENTORNO: "Producción"
-  APP_VERSION: 15.0.4
+  APP_VERSION: 15.0.12
   SECRET_KEY: change_me
   SQL_HOST: postgresql
   SQL_PORT: "5432"

+ 1 - 0
src/misfinanzas/settings.py

@@ -46,6 +46,7 @@ INSTALLED_APPS = [
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
+    'django.contrib.humanize',
 
     'finanzas',
     'reymotausers',

+ 4 - 2
src/templates/dashboard.html

@@ -1,5 +1,7 @@
 {% extends "base.html" %}
 
+{% load humanize %}
+
 {% block interface %}
 
 <section id="interface">
@@ -14,7 +16,7 @@
         <div class="val-cuenta">
             <div>
                 <h3>{{ f.nombre }}</h3>
-                <span>{{ f.saldo }}</span>
+                <span>{{ f.saldo|floatformat:2|intcomma }}</span>
             </div>
         </div>
         {% endfor %}
@@ -64,7 +66,7 @@
                     </td>
 
                     <td class="movimiento-monto">
-                        {{ m.monto |floatformat:2 }} €
+                        {{ m.monto|floatformat:2|intcomma }} €
                     </td>
 
                     <td class="movimiento">

+ 6 - 5
src/templates/listar_cuentas.html

@@ -1,4 +1,5 @@
 {% extends "base.html" %}
+{% load humanize %}
 
 {% block interface %}
 
@@ -24,16 +25,16 @@
             <tbody>
             {% for cuenta in cuentas %}
                 <tr class="{% cycle 'fila-impar' 'fila-par' %}">
-                    <td class="people">
-                        <h5>{{ cuenta.nombre }}</h5>
+                    <td class="movimiento">
+                        {{ cuenta.nombre }}
                     </td>
 
-                    <td class="people">
-                        <h5>{{ cuenta.get_tipo_display }}</h5>
+                    <td class="movimiento">
+                        {{ cuenta.tipo }}
                     </td>
                     
                     <td class="movimiento-monto" style="width: 20px;">
-                        {{ cuenta.saldo|floatformat:2 }}
+                        {{ cuenta.saldo|floatformat:2|intcomma }}
                     </td>
 
                     <td class="edit">