Skip to content

Commit

Permalink
Merge pull request #11 from lukearnould/develop
Browse files Browse the repository at this point in the history
Last polish changes
  • Loading branch information
lukearnould authored Jul 31, 2024
2 parents 7f85a5d + 82de11c commit 23e951b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,7 @@
<Build Include="dbo\Tables\Hospital.sql" />
<Build Include="Security\HospitalManagementUser.sql" />
</ItemGroup>
<ItemGroup>
<None Include="SampleData.sql" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions HospitalManagement.Database/SampleData.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
insert into Hospital values
('Mercy', 'Our Mercy health system was founded by the Sisters of Mercy in 1986. But our heritage goes back more than 195 years. It began with an Irish woman named Catherine McAuley, who was determined to help women and children in Dublin experiencing poverty.', '#a7ae7b', '4057551515', '[email protected]', 'https://www.mercy.net/'),
('Integris', 'As the state''s largest not-for-profit and Oklahoma-owned health care system, with hospitals, specialty clinics, family care practices and centers of excellence, INTEGRIS Health is here for you. But medicine isn''t always about caring for the sick. It''s about doing everything in our power to keep our friends and neighbors and every Oklahoman healthy.', '#106654', '4059493011', '[email protected]', 'https://integrishealth.org/'),
('SSM Health', 'SSM Health is a Catholic, not-for-profit health system providing high-quality, compassionate, and personalized care to communities across Illinois, Missouri, Oklahoma, and Wisconsin.', '#00194c', '4052727000', '[email protected]', 'https://www.ssmhealth.com/')
12 changes: 6 additions & 6 deletions HospitalManagement.Web/Views/Home/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@

<div class="edit-public-info-column">
<div class="form-floating mb-3">
<input id="phone-number" asp-for="PhoneNumber" type="tel" class="form-control" placeholder="Phone number" />
<label for="phone-number">Phone Number</label>
<input id="phone-number" asp-for="PhoneNumber" type="tel" class="form-control" placeholder="Contact Phone Number" />
<label for="phone-number">Contact Phone Number</label>
<span asp-validation-for="PhoneNumber"></span>
</div>

<div class="form-floating mb-3">
<input asp-for="EmailAddress" type="email" class="form-control" placeholder="Email Address" />
<label asp-for="EmailAddress">Email Address</label>
<input asp-for="EmailAddress" type="email" class="form-control" placeholder="Contact Email Address" />
<label asp-for="EmailAddress">Contact Email Address</label>
<span asp-validation-for="EmailAddress"></span>
</div>

<div class="form-floating mb-3">
<input asp-for="URL" type="url" class="form-control" placeholder="Website" />
<label asp-for="URL">Website</label>
<input asp-for="URL" type="url" class="form-control" placeholder="Main Webpage" />
<label asp-for="URL">Main Webpage</label>
<span asp-validation-for="URL"></span>
</div>
</div>
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@

## Initialization
1. Ensure the server for the database to be used has SQL Server logins enabled.
1. Change the connection string in `appsettings.json` to point to a database of your choice.
1. Change the connection string in `HospitalManagement.Web` > `appsettings.json` to point to a database of your choice.
* If the database is not of type Microsoft SQL Server, you will want to change the extension method in `HospitalManagement.Config.HospitalContext` from `UseSqlServer()` to your database engine of choice.
1. At the root of the `HospitalManagement.Web` project, run the below command in your command prompt:
2. At the root of the `Web` project, run the below command in your command prompt:

```cmd
dotnet user-secrets set "Database__Password" "<your password goes here>"
```

4. Update the password set in `HospitalManagement.Database.Security.HospitalManagementUser.sql` to match the password you entered above.
5. Publish the `HospitalManagement.Database` project to your database.
6. Run the below command at the root of the `HospitalManagement.Web` project:
4. Update the password set in `HospitalManagement.Database` > `Security` > `HospitalManagementUser.sql` to match the password you entered above.
5. Publish the `Database` project to your database.
6. It is recommended to now delete the aforementioned `HospitalManagementUser.sql` file to avoid committing your database user's password into source control.
7. Run the below command at the root of the `Web` project:

```cmd
npm install
```

### Optional
1. Execute the `SampleData.sql` script in the `Database` project to insert some sample data into the application's database.

0 comments on commit 23e951b

Please sign in to comment.