Skip to content

Commit

Permalink
Merge pull request #626 from RickWangPerth/v2.1.4prod
Browse files Browse the repository at this point in the history
Fix the aria-hide issue
  • Loading branch information
RickWangPerth authored Dec 5, 2024
2 parents 6f78909 + 9ad7b49 commit 0711a8a
Show file tree
Hide file tree
Showing 25 changed files with 2,829 additions and 119 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ taxonomy/fixtures/test_tax_*
*.csv
*.pgdump
compose.yaml
*.bacpac
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# syntax=docker/dockerfile:1
# Prepare the base environment.
FROM python:3.11.8-slim as builder_base_wastd

Check warning on line 4 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 4 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
Expand Down
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ patches:
- path: service_patch.yaml
images:
- name: ghcr.io/dbca-wa/wastd
newTag: 2.1.3
newTag: 2.1.4

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tool.poetry]
name = "wastd"
version = "2.1.3"
version = "2.1.4"


description = "Western Australian Sea Turtles Database"
authors = ["Florian Mayer <florian.mayer@dbca.wa.gov.au>", "Ashley Felton <ashley.felton@dbca.wa.gov.au>","Evan Hallein <evan.hallein@dbca.wa.gov.au>", "Rick Wang <rick.wang@dbca.wa.gov.au>"]
Expand Down
10 changes: 7 additions & 3 deletions wamtram2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class TrtBeachPositions(models.Model):
class Meta:
managed = False
db_table = "TRT_BEACH_POSITIONS"

def __str__(self):
return f"{self.description}"


class TrtBodyParts(models.Model):
Expand Down Expand Up @@ -2058,8 +2061,9 @@ class TrtRecordedTags(models.Model):
side = models.CharField(
db_column="SIDE", max_length=1, blank=True, null=True
) # Field name made lowercase.
tag_state = models.CharField(
db_column="TAG_STATE", max_length=10, blank=True, null=True
tag_state = models.ForeignKey(
'TrtTagStates', models.CASCADE, db_column="TAG_STATE", max_length=10,
blank=True, null=True
) # Field name made lowercase.
comments = models.CharField(
db_column="COMMENTS", max_length=255, blank=True, null=True
Expand Down Expand Up @@ -2222,7 +2226,6 @@ def __str__(self):
return f"{self.common_name}"



class TrtTags(models.Model):
tag_id = models.CharField(
db_column="TAG_ID", primary_key=True, max_length=10
Expand Down Expand Up @@ -2490,6 +2493,7 @@ class Meta:
def __str__(self):
return f"{self.description}"


SEX_CHOICES = [
("F", "Female"),
("M", "Male"),
Expand Down
90 changes: 90 additions & 0 deletions wamtram2/static/css/observation_management.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
.container-fluid {
padding: 20px;
}


.section-card {
background-color: #fff;
border: 1px solid #dee2e6;
border-radius: 5px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.nav-tabs {
margin-bottom: 20px;
}

.tab-content {
padding: 20px 0;
}

.form-row {
margin-bottom: 15px;
}

#searchResults {
margin-top: 20px;
}

#searchResults th {
background-color: #f8f9fa;
border-bottom: 2px solid #dee2e6;
}

#searchResults td {
vertical-align: middle;
}

.modified {
background-color: #fff3cd;
}

.readonly-field {
background-color: #e9ecef;
cursor: not-allowed;
}

.table-responsive {
overflow-x: auto;
}

#searchResults {
margin-bottom: 0;
}

#searchResults th {
background-color: #f8f9fa;
position: sticky;
top: 0;
z-index: 1;
}

#searchResults td {
vertical-align: middle;
}

.tag-info {
font-size: 0.85em;
color: #666;
margin-bottom: 5px;
}

.action-buttons {
white-space: nowrap;
}

@media (max-width: 768px) {
.container-fluid {
padding: 10px;
}

.section-card {
padding: 15px;
}

.form-row {
margin-bottom: 10px;
}
}
55 changes: 44 additions & 11 deletions wamtram2/static/css/search_styles.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,48 @@
/* search_styles.css */

/* Search input field style */
/* Select2 customization */
.select2-container .select2-selection--single {
height: 38px;
padding: 6px 12px;
font-size: 15px;
line-height: 1.42857143;
color: #495057;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 24px;
padding-left: 0;
color: #495057;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 36px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: #f5f5f5;
color: #444;
}

.select2-results__option {
padding: 6px 12px;
color: #444;
line-height: 1.42857143;
}

.select2-dropdown {
border: 1px solid #ccc;
border-radius: 5px;
background-color: #f8f9fa;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

/* Keep existing styles for other search elements */
.search-field {
/* Styles are similar to '.form-control' */
display: block;
width: 100%;
height: 38px;
Expand All @@ -15,14 +55,10 @@
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

/* Search results container style */
.search-results {
border: 1px solid #ccc;
border-radius: 5px;
Expand All @@ -33,24 +69,21 @@
position: absolute;
z-index: 1000;
width: 100%;
max-height: 200px; /* Max height */
overflow-y: auto; /* Scroll if too tall */
max-height: 200px;
overflow-y: auto;
}

/* Search result item style */
.search-result {
padding: 6px 12px;
cursor: pointer;
color: #444;
line-height: 1.42857143;
}

/* Style for the result item when hovered */
.search-result:hover {
background-color: #f5f5f5;
}

/* Style for the result item when it is selected */
.search-result.selected {
background-color: #e9e9e9;
}
143 changes: 143 additions & 0 deletions wamtram2/static/css/turtle_management.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@

.form-label {
color: #495057;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.table-container {
overflow-y: auto;
position: relative;
height: 40vh;
margin: 1rem 0;
border: 1px solid #dee2e6;
border-radius: 0.25rem;
}


.table {
width: 100%;
margin-bottom: 0;
color: #212529;
}


.table thead th {
position: sticky;
top: 0;
background: #f8f9fa;
z-index: 1;
font-weight: 500;
border-bottom: 2px solid #dee2e6;
}


.table tbody tr:hover {
background-color: rgba(0,0,0,.075);
cursor: pointer;
}


.section-card {
background-color: #fff;
border: 1px solid #dee2e6;
border-radius: 5px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}


.nav-tabs {
margin-bottom: 20px;
border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
color: #495057;
border: 1px solid transparent;
border-top-left-radius: .25rem;
border-top-right-radius: .25rem;
}

.nav-tabs .nav-link.active {
color: #495057;
background-color: #fff;
border-color: #dee2e6 #dee2e6 #fff;
}


.form-row {
margin-bottom: 15px;
}

.form-control.readonly-field {
background-color: #e9ecef;
cursor: not-allowed;
}


.modified {
background-color: #fff3cd;
}

@media (max-width: 768px) {
.container-fluid {
padding: 10px;
}

.section-card {
padding: 15px;
}

.table {
font-size: 0.875rem;
}

.table th,
.table td {
padding: 0.5rem;
}
}

.search-area {
margin-bottom: 1.5rem;
}

.search-area .input-group {
margin-bottom: 0.5rem;
}


.tag-info-area {
margin-top: 1.5rem;
}

.observation-area {
margin-top: 1.5rem;
}

.section-card {
padding: 20px;
background-color: #fff;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0,0,0,0.12);
margin-bottom: 20px;
}

.card {
margin-bottom: 15px;
}

.card-body {
padding: 15px;
}

.btn-success {
margin-bottom: 15px;
}

.tab-content {
padding-top: 20px;
}
Loading

0 comments on commit 0711a8a

Please sign in to comment.