Skip to content

Commit

Permalink
Merge pull request #169 from ResidenciaTICBrisa/recuperacao-de-senha
Browse files Browse the repository at this point in the history
Refatoracao do Frontend
  • Loading branch information
pedrobarbosaocb authored Feb 9, 2024
2 parents b1f2d97 + 4757cb0 commit 1767dc1
Show file tree
Hide file tree
Showing 32 changed files with 844 additions and 703 deletions.
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

0 comments on commit 1767dc1

Please sign in to comment.