From 0dac50cf33c6265c79fc19521b8f2492c73b2f80 Mon Sep 17 00:00:00 2001 From: SAYEED AJMAL Date: Sun, 11 Feb 2024 01:06:50 +0530 Subject: [PATCH] position added --- Web/Position.html | 58 +++++++++++++++++++ Web/Staff.html | 44 +++++++++++--- Web/donor.html | 10 ++-- setup.sh | 2 +- .../Controller/BloodBankController.java | 2 +- .../Controller/DonationController.java | 2 +- .../Controller/StaffController.java | 43 +++++++++----- .../BloodDonation/Email/MailService.java | 18 +++--- .../com/strong/BloodDonation/Model/Staff.java | 2 +- 9 files changed, 143 insertions(+), 38 deletions(-) create mode 100644 Web/Position.html diff --git a/Web/Position.html b/Web/Position.html new file mode 100644 index 0000000..99b0b6d --- /dev/null +++ b/Web/Position.html @@ -0,0 +1,58 @@ + + + + + + + Position Form + + + +

Staff Position

+

+ +
+ +
+ Enabled
+ + + +
+ + + + + \ No newline at end of file diff --git a/Web/Staff.html b/Web/Staff.html index 8c1477f..59cf0bd 100644 --- a/Web/Staff.html +++ b/Web/Staff.html @@ -9,16 +9,46 @@

Staff SignUp

-
-
-
-
-
+ +
+
+
+
+
- +
+

+ " + "
" + "

You're a Lifesaver!

" - + "

Dear " + donor.getFirstName() + "" + donor.getLastName() + ", Your ID : " + donor.getDonorId() + + "

Dear " + donor.getFirstName() + " " + donor.getLastName() + ", Your ID : " + donor.getDonorId() + ",

" + "

From the bottom of our hearts, thank you for choosing to donate blood! Your generous act will touch the lives of countless individuals in need.

" + "

Your decision doesn't just fill a vial, it fills their hope, their laughter, and their second chances. You are a true hero!

" @@ -237,16 +237,17 @@ public void sendStaffWelcomeEmail(Staff staff) { + ".container { background-color: #fff; padding: 20px; border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }" + "h1 { text-align: center; font-size: 24px; color: #333; }" + "p { line-height: 1.5; color: #666; }" + + "h4 {text-align: center; font-size: 18px; color: #0663440}" + ".heart { color: #e74c3c; font-size: 2em; margin-right: 5px; }" + ".button { display: block; background-color: #e74c3c; color: #fff; padding: 10px 20px; border: none; border-radius: 5px; text-align: center; cursor: pointer; margin-top: 20px; text-decoration: none; }" + ".button:hover { background-color: #c0392b; }" + "" + "
" - + "

Welcome to Our Team, " + staff.getStaffName() + " ID: " - + staff.getStaffId() + "!

" + + "

Welcome to Our Team, " + staff.getStaffName() + "!


" + + "

Your Id is:- " + staff.getStaffId() + "

" + "

We are thrilled to have you on board. Your account has been successfully created.

" + "

Feel free to explore our platform and reach out if you have any questions or need assistance.

" - + "

We've notified you about your position, please wait for further instructions.

" + + "

We've notified you about your position, please wait for further instructions.

" + "

Best regards,

" + "

The " + OrganisationName + " Manager.

" + "
" @@ -263,6 +264,7 @@ public void sendStaffPositionNotification(Staff staff) { + ".container { background-color: #fff; padding: 20px; border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }" + "h1 { text-align: center; font-size: 24px; color: #333; }" + "p { line-height: 1.5; color: #666; }" + + "h4 {text-align: center; font-size: 18px; color: #0663440}" + ".heart { color: #e74c3c; font-size: 2em; margin-right: 5px; }" + ".button { display: block; background-color: #e74c3c; color: #fff; padding: 10px 20px; border: none; border-radius: 5px; text-align: center; cursor: pointer; margin-top: 20px; text-decoration: none; }" + ".button:hover { background-color: #c0392b; }" @@ -270,10 +272,10 @@ public void sendStaffPositionNotification(Staff staff) { + "
" + "

Staff Position Updated Successfully!

" + "

Dear " + staff.getStaffName() + " ID: " + staff.getStaffId() + ",

" - + "

We're delighted to inform you that you've been assigned the position of " + staff.getPosition() - + ".

" + + "

We're delighted to inform you that you've been assigned the position of " + staff.getPosition() + + ".

" + "

Thank you for your dedication and commitment to our team. We believe you'll excel in your new role!

" - + "

Your position has been successfully updated. You are now " + staff.isEnabled() + ".

" + + "

Your position has been successfully updated. You are now " + staff.isEnabled() + ".

" + "

Best regards,

" + "

The " + OrganisationName + " Manager

" + "
" @@ -297,7 +299,7 @@ public void sendDonationConfirmation(Donation donation) { + "" + "
" + "

Thank You for Donating Blood!

" - + "

Dear " + donation.getDonor().getFirstName() + "" + donation.getDonor().getLastName() + ",

" + + "

Dear " + donation.getDonor().getFirstName() + " " + donation.getDonor().getLastName() + ",

" + "

We are writing to express our sincere gratitude for your recent blood donation. Your generosity will make a real difference in the lives of others.

" + "

Here are the details of your donation:

" + "
    " diff --git a/src/main/java/com/strong/BloodDonation/Model/Staff.java b/src/main/java/com/strong/BloodDonation/Model/Staff.java index 0b7713f..251d75c 100644 --- a/src/main/java/com/strong/BloodDonation/Model/Staff.java +++ b/src/main/java/com/strong/BloodDonation/Model/Staff.java @@ -21,7 +21,7 @@ public class Staff { @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + @GeneratedValue(strategy = GenerationType.AUTO) private Integer staffId; @Column(nullable = false)