-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from PenseNisso/style/fixcompany-reportform
style(company/report-form):company rating and report form styles
- Loading branch information
Showing
8 changed files
with
137 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,46 @@ | ||
# Generated by Django 4.2.5 on 2023-12-11 13:07 | ||
|
||
import django.db.models.deletion | ||
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), | ||
('company', '0002_alter_company_options'), | ||
("company", "0002_alter_company_options"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Rate', | ||
name="Rate", | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('score', models.DecimalField(decimal_places=2, max_digits=3)), | ||
('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='users_reviews', to='company.company')), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='evaluated_companies', to=settings.AUTH_USER_MODEL)), | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("score", models.DecimalField(decimal_places=2, max_digits=3)), | ||
( | ||
"company", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="users_reviews", | ||
to="company.company", | ||
), | ||
), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="evaluated_companies", | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
{% extends "global/base.html" %} | ||
|
||
{% block content %} | ||
<center> | ||
<h1> | ||
Denuncie uma Empresa | ||
<div class="flex flex-column justify-center items-center bg-red-400 text-white w-full h-10 text-center my-6"> | ||
<h1 class="text-2xl font-bold"> | ||
<ion-icon name="megaphone"></ion-icon> Denuncie | ||
</h1> | ||
<p> | ||
{% block errors %} | ||
{% endblock %} | ||
</p> | ||
</div> | ||
|
||
<p> | ||
{% block errors %} | ||
{% endblock %} | ||
</p> | ||
<div class="flex flex-col justify-start"> | ||
{% block form_content %} | ||
{% endblock %} | ||
</center> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% load crispy_forms_filters %} | ||
{% load l10n %} | ||
|
||
<div class="relative"> | ||
<select class="{% if field.errors %}border border-red-500 {% endif %}bg-white focus:outline-none border border-gray-300 rounded-lg py-2 px-4 block w-full appearance-none leading-normal text-gray-700" name="{{ field.html_name }}" {{ field.field.widget.attrs|flatatt }}> | ||
{% for value, label in field.field.choices %} | ||
{% include "tailwind/layout/select_option.html" with value=value label=label %} | ||
{% endfor %} | ||
</select> | ||
</div> |