generated from FGA0138-MDS-Ajax/template-repository
-
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.
Co-authored-by: vinialves2020 <[email protected]> Co-authored-by: bolzanMGB <[email protected]>
- Loading branch information
1 parent
d73ab51
commit b5e3629
Showing
37 changed files
with
567 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
mamutes/Users/migrations/0008_remove_membroequipe_areas_and_more.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,21 @@ | ||
# Generated by Django 5.1.4 on 2024-12-22 23:23 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Users', '0007_remove_membroequipe_profile_picture'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='membroequipe', | ||
name='areas', | ||
), | ||
migrations.RemoveField( | ||
model_name='membroequipe', | ||
name='functions', | ||
), | ||
] |
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
Binary file not shown.
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,16 +1,28 @@ | ||
from django.contrib import admin | ||
from django.urls import path | ||
from django.urls import path, include | ||
from Users.views import login, register, recoverAccount, redefinePassword | ||
from guest.views import index, competition, admission | ||
|
||
|
||
urlpatterns = [ | ||
|
||
path('admin/', admin.site.urls), | ||
|
||
# Users | ||
path('login/', login, name='login'), | ||
path('register/', register, name='register'), | ||
path('account_recovery/', recoverAccount, name='recoverAccount'), | ||
path('redefine_password/<str:username>/<str:token>', redefinePassword, name="redefinePassword"), | ||
|
||
# guest | ||
path('', index, name="index"), | ||
path('competition/', competition, name="competition"), | ||
path('admission/', admission, name="admission"), | ||
|
||
# report | ||
path('report/', include('report.urls')), | ||
|
||
# members | ||
|
||
# stock | ||
|
||
] |
Empty file.
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,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class MembersConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'members' |
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,28 @@ | ||
# Generated by Django 5.1.4 on 2024-12-22 23:23 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Task', | ||
fields=[ | ||
('id', models.AutoField(primary_key=True, serialize=False)), | ||
('description', models.TextField()), | ||
('status', models.CharField(choices=[('Pendente', 'Pendente'), ('Em Progresso', 'Em Progresso'), ('Concluída', 'Concluída')], max_length=15)), | ||
('creation_date', models.DateTimeField(auto_now_add=True)), | ||
('completion_date', models.DateTimeField(blank=True, null=True)), | ||
('responsible', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
Empty file.
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,19 @@ | ||
from django.db import models | ||
from Users.models import MembroEquipe | ||
|
||
# Create your models here. | ||
class Task(models.Model): | ||
id = models.AutoField(primary_key=True) | ||
STATUS_CHOICES = [ | ||
('Pendente', 'Pendente'), | ||
('Em Progresso', 'Em Progresso'), | ||
('Concluída', 'Concluída'), | ||
] | ||
description = models.TextField() | ||
status = models.CharField(max_length=15, choices=STATUS_CHOICES) | ||
creation_date = models.DateTimeField(auto_now_add=True) | ||
completion_date = models.DateTimeField(null=True, blank=True) | ||
responsible = models.ForeignKey(MembroEquipe, on_delete=models.CASCADE) | ||
|
||
def __str__(self): | ||
return f"{self.description} - {self.status}" |
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,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
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,3 @@ | ||
from django.shortcuts import render | ||
|
||
# Create your views here. |
Empty file.
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,8 @@ | ||
from django.contrib import admin | ||
from .models import FlightLog | ||
from .models import Minutes | ||
from .models import AccidentLog | ||
# Register your models here. | ||
admin.site.register(FlightLog) | ||
admin.site.register(Minutes) | ||
admin.site.register(AccidentLog) |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ReportConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'report' |
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,7 @@ | ||
from django import forms | ||
from .models import FlightLog | ||
|
||
class FlightForm(forms.ModelForm): | ||
class Meta: | ||
model = FlightLog | ||
fields = '__all__' # Inclui todos os campos do modelo Voo |
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,66 @@ | ||
# Generated by Django 5.1.4 on 2024-12-22 23:23 | ||
|
||
import django.core.validators | ||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='FlightLog', | ||
fields=[ | ||
('id', models.AutoField(primary_key=True, serialize=False)), | ||
('date', models.DateField()), | ||
('start_time', models.TimeField()), | ||
('end_time', models.TimeField()), | ||
('document_username', models.CharField(max_length=255)), | ||
('pilot_name', models.CharField(max_length=255)), | ||
('location', models.CharField(max_length=255)), | ||
('team_members', models.TextField()), | ||
('flight_success_rating', models.IntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(5)])), | ||
('flight_objective_description', models.TextField()), | ||
('results', models.TextField()), | ||
('pilot_impressions', models.TextField()), | ||
('improvements', models.TextField()), | ||
('wind_speed', models.DecimalField(decimal_places=3, max_digits=4)), | ||
('wind_direction', models.CharField(max_length=100)), | ||
('atmospheric_pressure', models.DecimalField(decimal_places=3, max_digits=4)), | ||
('total_takeoff_weight', models.DecimalField(decimal_places=3, max_digits=4)), | ||
('flight_cycles', models.PositiveIntegerField()), | ||
('telemetry_link', models.URLField()), | ||
('occurred_accident', models.BooleanField(default=False)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='AccidentLog', | ||
fields=[ | ||
('id', models.AutoField(primary_key=True, serialize=False)), | ||
('description', models.TextField()), | ||
('damaged_parts', models.TextField()), | ||
('damaged_parts_photo', models.URLField()), | ||
('was_turbulent', models.BooleanField(default=False)), | ||
('pilot_flight_count', models.PositiveIntegerField()), | ||
('pilot_impressions', models.TextField()), | ||
('id_flightLog', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='report.flightlog')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Minutes', | ||
fields=[ | ||
('id', models.AutoField(primary_key=True, serialize=False)), | ||
('date', models.DateField()), | ||
('title', models.CharField(max_length=200)), | ||
('content', models.TextField()), | ||
('responsible', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
Empty file.
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,56 @@ | ||
from django.db import models | ||
from Users.models import MembroEquipe | ||
from django.core.validators import MinValueValidator, MaxValueValidator | ||
|
||
class Minutes(models.Model): | ||
id = models.AutoField(primary_key=True) | ||
date = models.DateField() | ||
title = models.CharField(max_length=200) | ||
content = models.TextField() | ||
responsible = models.ForeignKey(MembroEquipe, on_delete=models.CASCADE) | ||
|
||
def __str__(self): | ||
return self.title | ||
|
||
class FlightLog(models.Model): | ||
id = models.AutoField(primary_key=True) | ||
date = models.DateField() | ||
start_time = models.TimeField() | ||
end_time = models.TimeField() | ||
document_username = models.CharField(max_length=255) | ||
pilot_name = models.CharField(max_length=255) | ||
location = models.CharField(max_length=255) | ||
team_members = models.TextField() | ||
flight_success_rating = models.IntegerField(validators=[MinValueValidator(1),MaxValueValidator(5)]) | ||
flight_objective_description = models.TextField() ######### | ||
results = models.TextField() | ||
pilot_impressions = models.TextField() | ||
improvements = models.TextField() | ||
wind_speed = models.DecimalField(max_digits=4, decimal_places=3) | ||
wind_direction = models.CharField(max_length=100) | ||
atmospheric_pressure = models.DecimalField(max_digits=4, decimal_places=3) | ||
total_takeoff_weight = models.DecimalField(max_digits=4, decimal_places=3) | ||
flight_cycles = models.PositiveIntegerField() | ||
telemetry_link = models.URLField() | ||
occurred_accident = models.BooleanField(default=False) | ||
|
||
def __str__(self): | ||
return f"Flight Log {self.id} - {self.date} by {self.pilot_name}" | ||
|
||
class AccidentLog(models.Model): | ||
id = models.AutoField(primary_key=True) | ||
id_flightLog = models.ForeignKey(FlightLog, on_delete=models.CASCADE) | ||
description = models.TextField() | ||
damaged_parts = models.TextField() | ||
damaged_parts_photo = models.URLField() | ||
was_turbulent = models.BooleanField(default=False) | ||
pilot_flight_count = models.PositiveIntegerField() | ||
pilot_impressions = models.TextField() | ||
|
||
def __str__(self): | ||
return f"Accident Log {self.id} - Flight {self.flight_log.id}" | ||
|
||
|
||
|
||
|
||
|
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,92 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #121212; | ||
color: #f5f5f5; | ||
margin: 0; | ||
padding: 20px; | ||
} | ||
|
||
h1 { | ||
text-align: center; | ||
color: #1e90ff; | ||
margin-bottom: 20px; | ||
} | ||
|
||
table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
background-color: #1c1c1c; | ||
margin: 0 auto; | ||
border-radius: 8px; | ||
overflow: hidden; | ||
} | ||
|
||
thead { | ||
background-color: #1e90ff; | ||
} | ||
|
||
thead th { | ||
color: white; | ||
text-align: left; | ||
padding: 12px; | ||
} | ||
|
||
tbody tr { | ||
border-bottom: 1px solid #333; | ||
} | ||
|
||
tbody tr:nth-child(even) { | ||
background-color: #181818; | ||
} | ||
|
||
tbody tr:hover { | ||
background-color: #1e90ff; | ||
color: white; | ||
} | ||
|
||
tbody td { | ||
padding: 12px; | ||
} | ||
|
||
a { | ||
color: #1e90ff; | ||
text-decoration: none; | ||
} | ||
|
||
a:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
.btn { | ||
padding: 6px 12px; | ||
border-radius: 4px; | ||
text-decoration: none; | ||
color: #fff; | ||
font-weight: bold; | ||
} | ||
|
||
.btn-editar { | ||
background-color: #007bff; | ||
} | ||
|
||
.btn-editar:hover { | ||
background-color: #0056b3; | ||
} | ||
|
||
.btn-excluir { | ||
background-color: #dc3545; | ||
} | ||
|
||
.btn-excluir:hover { | ||
background-color: #a71d2a; | ||
} | ||
|
||
@media (max-width: 768px) { | ||
table { | ||
font-size: 14px; | ||
} | ||
|
||
thead { | ||
font-size: 16px; | ||
} | ||
} |
Oops, something went wrong.