Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refatoracao do Frontend #169

Merged
merged 17 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
16dc4e2
style: refatorando html base para reset
pedrobarbosaocb Feb 5, 2024
87e2782
style: criacao da tela de Redefinicao de Senha de acordo com o estilo…
pedrobarbosaocb Feb 6, 2024
289652a
refact: refatoração da homepage utilizando novo html base
pedrobarbosaocb Feb 6, 2024
8363950
fix: remocao do link da navbar quando esta na propria pagina
pedrobarbosaocb Feb 6, 2024
1009633
refact: refatoracao da tela de login usando a base de layout
pedrobarbosaocb Feb 6, 2024
051ca65
feat: adicao da tela 404 e tela inicial de perfil
pedrobarbosaocb Feb 7, 2024
25cb64a
style: estilizacao seguindo layout automatec da tela de perfil
pedrobarbosaocb Feb 7, 2024
6384ae3
feat: adicionando logica de recuperacao de senha
pedrobarbosaocb Feb 5, 2024
ce08fa0
feat: adicionando logica de recuperacao de senha
pedrobarbosaocb Feb 5, 2024
0215bed
fix: corrigindo merge inadequado
pedrobarbosaocb Feb 8, 2024
83ccecd
style: adicao de mascaras para dados sensiveis
pedrobarbosaocb Feb 8, 2024
c032dcf
fix: logs aparecem agora ordenados do mais recente para o mais antigo…
pedrobarbosaocb Feb 8, 2024
1dda9ce
style: adicao do modal de alteracao de senha
pedrobarbosaocb Feb 8, 2024
697af5b
refact: atualizacao inicial da nova pagina de projeto
pedrobarbosaocb Feb 8, 2024
9c06c1d
refact: atualizacao da pagina de consultas de projetos
pedrobarbosaocb Feb 9, 2024
904bcf0
fix: pagina de alteracao de senha com versao estavel
pedrobarbosaocb Feb 9, 2024
4757cb0
Merge branch 'dev' into recuperacao-de-senha
pedrobarbosaocb Feb 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion project/app/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User

# Register your models here.
from .models import Employee


# Define an inline admin descriptor for Employee model
# which acts a bit like a singleton
class EmployeeInline(admin.StackedInline):
model = Employee
can_delete = False
verbose_name_plural = "employee"


# Define a new User admin
class UserAdmin(BaseUserAdmin):
inlines = [EmployeeInline]


# Re-register UserAdmin
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
72 changes: 41 additions & 31 deletions project/app/migrations/0001_initial.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.5 on 2023-10-27 11:29
# Generated by Django 4.2.4 on 2024-02-08 14:19

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -23,6 +23,35 @@ class Migration(migrations.Migration):
('id_projeto', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='Lancamento',
fields=[
('id_mapeamento', models.IntegerField(primary_key=True, serialize=False)),
('id_favorecido', models.CharField(max_length=200)),
('nome_favorecido', models.CharField(max_length=200)),
('cnpj_favorecido', models.CharField(max_length=200)),
('tipo_favorecido', models.CharField(max_length=200)),
('valor_lancado', models.CharField(max_length=200)),
('valor_pago', models.CharField(max_length=200)),
('data_vencimento', models.CharField(max_length=200)),
('id_status', models.CharField(max_length=200)),
('status_lancamento', models.CharField(max_length=200)),
('flag_receita', models.CharField(max_length=200)),
('data_baixa', models.CharField(max_length=200)),
('his_lancamento', models.CharField(max_length=200)),
('data_emissao', models.CharField(max_length=200)),
('num_doc_fin', models.CharField(max_length=200)),
('data_cria', models.CharField(max_length=200)),
('data_pagamento', models.CharField(max_length=200)),
('id_lancamento', models.CharField(max_length=200)),
('id_projeto', models.CharField(max_length=200)),
('id_rubrica', models.CharField(max_length=200)),
('nome_rubrica', models.CharField(max_length=200)),
('tipo_movimento', models.CharField(max_length=200)),
('id_tp_lancamento', models.CharField(max_length=200)),
('tipo_lancamento', models.CharField(max_length=200)),
],
),
migrations.CreateModel(
name='Mapeamento',
fields=[
Expand Down Expand Up @@ -69,36 +98,7 @@ class Migration(migrations.Migration):
('id_departamento', models.CharField(max_length=200)),
('nome_instituicao', models.CharField(max_length=200)),
('id_instituicao_executora', models.CharField(max_length=200)),
('id_tipo', models.CharField(max_length=201)),
],
),
migrations.CreateModel(
name='MapeamentoConveniar',
fields=[
('id_mapeamento', models.IntegerField(primary_key=True, serialize=False)),
('id_favorecido', models.CharField(max_length=200)),
('nome_favorecido', models.CharField(max_length=200)),
('cnpj_favorecido', models.CharField(max_length=200)),
('tipo_favorecido', models.CharField(max_length=200)),
('valor_lancado', models.CharField(max_length=200)),
('valor_pago', models.CharField(max_length=200)),
('data_vencimento', models.CharField(max_length=200)),
('id_status', models.CharField(max_length=200)),
('status_lancamento', models.CharField(max_length=200)),
('flag_receita', models.CharField(max_length=200)),
('data_baixa', models.CharField(max_length=200)),
('his_lancamento', models.CharField(max_length=200)),
('data_emissao', models.CharField(max_length=200)),
('num_doc_fin', models.CharField(max_length=200)),
('data_cria', models.CharField(max_length=200)),
('data_pagamento', models.CharField(max_length=200)),
('id_lancamento', models.CharField(max_length=200)),
('id_projeto', models.CharField(max_length=200)),
('id_rubrica', models.CharField(max_length=200)),
('nome_rubrica', models.CharField(max_length=200)),
('tipo_movimento', models.CharField(max_length=200)),
('id_tp_lancamento', models.CharField(max_length=200)),
('tipo_lancamento', models.CharField(max_length=200)),
('id_tipo', models.CharField(max_length=200)),
],
),
migrations.CreateModel(
Expand All @@ -112,6 +112,16 @@ class Migration(migrations.Migration):
('nome_usuario', models.CharField(max_length=200)),
],
),
migrations.CreateModel(
name='UserActivity',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user_id', models.CharField(max_length=255)),
('tag', models.CharField(max_length=50)),
('activity', models.TextField()),
('timestamp', models.DateTimeField(auto_now_add=True)),
],
),
migrations.CreateModel(
name='Template',
fields=[
Expand Down
24 changes: 24 additions & 0 deletions project/app/migrations/0002_employee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.4 on 2024-02-08 14:22

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('app', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='Employee',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('cpf', models.CharField(max_length=11)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
]

This file was deleted.

18 changes: 0 additions & 18 deletions project/app/migrations/0003_alter_mapeamento_id_tipo.py

This file was deleted.

22 changes: 0 additions & 22 deletions project/app/migrations/0004_useractivity.py

This file was deleted.

18 changes: 0 additions & 18 deletions project/app/migrations/0005_useractivity_tag.py

This file was deleted.

18 changes: 0 additions & 18 deletions project/app/migrations/0006_alter_useractivity_tag.py

This file was deleted.

Empty file modified project/app/migrations/__init__.py
100755 → 100644
Empty file.
5 changes: 5 additions & 0 deletions project/app/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from django.db import models
from django.contrib.auth.models import User

class Employee(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
cpf = models.CharField(max_length=11)

class Mapeamento(models.Model):
id_mapeamento = models.IntegerField(primary_key=True)
Expand Down
56 changes: 56 additions & 0 deletions project/app/static/css/base_style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
* {
font-family: 'Montserrat', sans-serif;
}

html, body {
background-image: linear-gradient(#021842 50%, #253e6c);
background-size: contain; /* Added */
background-repeat: no-repeat; /* Added */
height: 100vh;
margin: 0;
padding: 0;
}

nav {
background-color: #021842;
padding-block: 25px;
box-shadow: 10px 5px 5px #021233;
}

.link-primary {
text-decoration: none;
color: aliceblue;
padding-inline: 10px;
}

.link-primary:hover {
color: rgb(185, 200, 212);
}

body {
justify-content: space-between;
flex-direction: column;
display: flex;
margin: 0;
}

footer {
color: aliceblue;
bottom: 0;
height: 2.5rem;
}

/* tentativa de deixar a tela responsiva
se o content passa da margem da tela
a cor de fundo nao acompanha */
/* @media (min-height: 100vh) {
html, body {
height: fit-content;
}
}

@media (max-height: 100vh) {
html, body {
height: 100vh;
}
} */
19 changes: 19 additions & 0 deletions project/app/static/css/new_home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:root {
--btn-hover: #F39B00;
--text-color: aliceblue;
}

.btn {
padding: 15px 50px 15px 50px;
background-color: var(--text-color);
border-radius: 20px;
}

.btn:hover {
transition: 300ms;
background-color: var(--btn-hover);
}

h5 {
color: rgb(212, 212, 212);
}
15 changes: 15 additions & 0 deletions project/app/static/imagem/logo50%.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions project/app/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% extends 'base_reset.html' %}
{% block conteudo %}
{% load static %}

<div class="row justify-content-center">
<div class="col-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Erro 404 - Página não encontrada</h5>
<img class="img img-fluid" style="height: 300px;" src="http://edgecats.net/0.32412984014182733" alt="">
<hr>

<div class="row justify-content-center">
<div class="col-6">
<a class="btn btn-success" href="/">Voltar para Home</a>
</div>
</div>
</div>
</div>
</div>
</div>

{% endblock %}
Loading
Loading