Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Java CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Build with Maven
run: mvn clean install
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public String processCreationForm(Owner owner, @Valid Pet pet, BindingResult res

owner.addPet(pet);
this.owners.save(owner);
redirectAttributes.addFlashAttribute("message", "New Pet has been Added");
redirectAttributes.addFlashAttribute("message", "Pet successfully added!");
return "redirect:/owners/{ownerId}";
Comment on lines +124 to 125
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title suggests only a PetController change, but this PR also includes vet UI template updates and a major rewrite of VetRepository.java (introducing a controller). Please align the PR title/description with the actual scope, or split the unrelated changes into separate PRs for reviewability.

Copilot uses AI. Check for mistakes.
}

Expand Down Expand Up @@ -154,7 +154,7 @@ public String processUpdateForm(Owner owner, @Valid Pet pet, BindingResult resul
}

updatePetDetails(owner, pet);
redirectAttributes.addFlashAttribute("message", "Pet details has been edited");
redirectAttributes.addFlashAttribute("message", "Pet updated successfully!");
return "redirect:/owners/{ownerId}";
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/templates/owners/ownersList.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<body>

<h2 th:text="#{owners}">Owners</h2>
<h2 th:text="#{owners}">Pet Owners Directory</h2>

<table id="owners" class="table table-striped">
<thead>
<tr>
<th th:text="#{name}" style="width: 150px;">Name</th>
<th th:text="#{address}" style="width: 200px;">Address</th>
<th th:text="#{name}" style="width: 150px;">Owner Name</th>
<th th:text="#{address}" style="width: 200px;">Home Address</th>
<th th:text="#{city}">City</th>
<th th:text="#{telephone}" style="width: 120px">Telephone</th>
<th th:text="#{pets}">Pets</th>
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/templates/vets/vetList.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<body>

<h2 th:text="#{vets}">Veterinarians</h2>
<h2 th:text="#{vets}">Veterinarian Directory</h2>

<table id="vets" class="table table-striped">
<thead>
<tr>
<th th:text="#{name}">Name</th>
<th th:text="#{specialties}">Specialties</th>
<th th:text="#{name}">Veterinarian Name</th>
<th th:text="#{specialties}">Areas of Expertise</th>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback text changes (e.g., “Veterinarian Directory”, “Veterinarian Name”) won’t be shown at runtime because th:text replaces the element content with the value from the message bundle keys (vets, name, specialties). If the intent is to change the UI labels, update the corresponding entries in src/main/resources/messages/messages*.properties or introduce new message keys.

Suggested change
<th th:text="#{specialties}">Areas of Expertise</th>
<th th:text="#{specialties}">Specialties</th>

Copilot uses AI. Check for mistakes.
</tr>
</thead>
<tbody>
Expand Down