-
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 #80 from PenseNisso/feature/verificar_sugestoes
Feature/verificar_sugestoes
- Loading branch information
Showing
11 changed files
with
400 additions
and
33 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
company/migrations/0005_alter_rate_company_alter_rate_score_alter_rate_user.py
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,31 @@ | ||
# Generated by Django 4.2.5 on 2023-12-12 21:25 | ||
|
||
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', '0004_merge_0003_companysuggestionmodel_0003_rate'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='company', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_ratings', to='company.company'), | ||
), | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='score', | ||
field=models.IntegerField(), | ||
), | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='user', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rated_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.5 on 2023-12-12 23:46 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('company', '0005_alter_rate_company_alter_rate_score_alter_rate_user'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='companysuggestionmodel', | ||
name='status', | ||
field=models.CharField(choices=[('RE', 'Recusado'), ('NV', 'Não verificado'), ('AP', 'Aprovado')], default='NV', max_length=20), | ||
), | ||
] |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% extends "global/base.html" %} | ||
{% load info_extras %} | ||
{% load crispy_forms_tags %} | ||
|
||
{% block title %} | ||
- Moderação | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="w-full text-justify space-y-1 mt-4"> | ||
<h2 class="text-2xl font-bold">{{ object.name }}</h2> | ||
<p><strong>Área de atuação: </strong>{{ object.field_of_operation }}</p> | ||
<p><strong>Site da empresa: </strong>{{ object.link|urlize|url_fix }}</p> | ||
<p><strong>Descrição: </strong>{{ object.description }}</p> | ||
</div> | ||
|
||
<div class="divider"></div> | ||
|
||
<form enctype="multipart/form-data" method="post" class="flex flex-col mb-6"> | ||
{% csrf_token %} | ||
{{ form|crispy }} | ||
<input type="submit" value="Avaliar Sugestão" | ||
class="bg-blue-700 bg-opacity-30 w-full py-1.5 px-3 font-semibold rounded-md cursor-pointer hover:scale-[1.035] mt-2"> | ||
</form> | ||
{% 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
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,24 @@ | ||
{% extends "global/base.html" %} | ||
|
||
{% block title %} | ||
- Moderação | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<!-- Page Title --> | ||
<div class="bg-blue-600 text-white w-full text-center my-6 py-1.5"> | ||
<h1 class="text-2xl font-bold">Sugestões de Empresas Não Verificadas</h1> | ||
</div> | ||
|
||
<div class="w-11/12 space-y-5"> | ||
{% for suggestion in suggestion_list %} | ||
<div class="bg-indigo-100 rounded-xl pt-2 pb-3 px-4 cursor-pointer hover:scale-[1.035]" | ||
onclick="window.location.href='{% url 'user:suggestionvalidation' suggestion.id %}'"> | ||
<h2 class="text-lg font-bold">{{ suggestion.name }}</h2> | ||
<div class="flex flex-row justify-between"> | ||
<p>{{ suggestion.field_of_operation }}</p> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{% endblock %} |
Oops, something went wrong.