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
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ public String initCreationForm() {
@PostMapping("/owners/new")
public String processCreationForm(@Valid Owner owner, BindingResult result, RedirectAttributes redirectAttributes) {
if (result.hasErrors()) {
redirectAttributes.addFlashAttribute("error", "There was an error in creating the owner.");
redirectAttributes.addFlashAttribute("error", "Errorcreating the owner.");
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 flash error message has a typo (missing space) and reads awkwardly. Please fix the text so it’s readable for end users.

Suggested change
redirectAttributes.addFlashAttribute("error", "Errorcreating the owner.");
redirectAttributes.addFlashAttribute("error", "Error creating owner.");

Copilot uses AI. Check for mistakes.
return VIEWS_OWNER_CREATE_OR_UPDATE_FORM;
}

this.owners.save(owner);
redirectAttributes.addFlashAttribute("message", "New Owner Created");
redirectAttributes.addFlashAttribute("message", "Owner Created Successfully");
return "redirect:/owners/" + owner.getId();
Comment on lines 77 to 86
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 this change is limited to the Owner controller, but the PR also modifies global styling (petclinic.scss) and the startup banner (banner.txt). Consider splitting these into separate PRs or updating the PR title/description to reflect the full scope.

Copilot uses AI. Check for mistakes.
}

Expand Down Expand Up @@ -142,7 +142,7 @@ public String initUpdateOwnerForm() {
public String processUpdateOwnerForm(@Valid Owner owner, BindingResult result, @PathVariable("ownerId") int ownerId,
RedirectAttributes redirectAttributes) {
if (result.hasErrors()) {
redirectAttributes.addFlashAttribute("error", "There was an error in updating the owner.");
redirectAttributes.addFlashAttribute("error", "Error updating the owner.");
return VIEWS_OWNER_CREATE_OR_UPDATE_FORM;
}

Expand All @@ -154,7 +154,7 @@ public String processUpdateOwnerForm(@Valid Owner owner, BindingResult result, @

owner.setId(ownerId);
this.owners.save(owner);
redirectAttributes.addFlashAttribute("message", "Owner Values Updated");
redirectAttributes.addFlashAttribute("message", "Owner Values Updated Successfully");
return "redirect:/owners/{ownerId}";
}

Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/banner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@
|___| |_______| |___| |_______|_______|___|_| |__|___|_______| / / / /
==================================================================/_/_/_/

Welcome to Pet Clinic

Spring Petclinic is a Spring Boot application built using Maven or Gradle.
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 added banner line has trailing whitespace at the end of the sentence. Please remove the trailing space to avoid noisy diffs and formatting issues in some terminals/editors.

Suggested change
Spring Petclinic is a Spring Boot application built using Maven or Gradle.
Spring Petclinic is a Spring Boot application built using Maven or Gradle.

Copilot uses AI. Check for mistakes.
Java 17 or later is required for the build, and the application can run with Java 17 or newer.

:: Built with Spring Boot :: ${spring-boot.version}

18 changes: 9 additions & 9 deletions src/main/scss/petclinic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ $spring-green: #6db33f;
$spring-dark-green: #5fa134;
$spring-brown: #34302D;
$spring-grey: #838789;
$spring-light-grey: #f1f1f1;
$spring-white: #ffffff;
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.

$spring-light-grey was removed, but it’s still referenced later in this stylesheet (e.g., .btn-primary text color). This will cause SCSS compilation to fail due to an undefined variable. Either keep $spring-light-grey defined (possibly mapping it to $spring-white) or update the remaining references to use an existing color variable.

Suggested change
$spring-white: #ffffff;
$spring-white: #ffffff;
$spring-light-grey: $spring-white;

Copilot uses AI. Check for mistakes.

$body-bg: $spring-light-grey;
$body-bg: $spring-white;
$text-color: $spring-brown;
$link-color: $spring-dark-green;
$link-hover-color: $spring-dark-green;

$navbar-default-link-color: $spring-light-grey;
$navbar-default-link-active-color: $spring-light-grey;
$navbar-default-link-hover-color: $spring-light-grey;
$navbar-default-link-color: $spring-white;
$navbar-default-link-active-color: $spring-white;
$navbar-default-link-hover-color: $spring-white;
$navbar-default-link-hover-bg: $spring-green;
$navbar-default-toggle-icon-bar-bg: $spring-light-grey;
$navbar-default-toggle-icon-bar-bg: $spring-white;
$navbar-default-toggle-hover-bg: transparent;
$navbar-default-link-active-bg: $spring-green;

$border-radius-base: 0;
$border-radius-large: 0;
$border-radius-small: 0;

$nav-tabs-active-link-hover-color: $spring-light-grey;
$nav-tabs-active-link-hover-color: $spring-white;
$nav-tabs-active-link-hover-bg: $spring-brown;
$nav-tabs-active-link-hover-border-color: $spring-brown;
$nav-tabs-border-color: $spring-brown;
Expand All @@ -49,7 +49,7 @@ $table-border-color: $spring-brown;

.table > thead > tr > th {
background-color: lighten($spring-brown, 3%);
color: $spring-light-grey;
color: $spring-white;
}

.table-filter {
Expand Down Expand Up @@ -181,7 +181,7 @@ table td.action-column {

.container-details-table th {
background-color: lighten($spring-brown, 3%);
color: $spring-light-grey;
color: $spring-white;
}

.status-help-content-table td {
Expand Down
Loading