Comments (4)
I think I have narrowed the primary issue to being TimeZone related. I am operating in Adelaide Australia which is UTC+9:30.
In looking through the source code it appears that the TestDate was being initialised for UTC-4.00.
Thus appointments were being generated in non-available days/hours and therefore not appearing outside the available time slots. I adjusted the UTC time settings in several places and now am getting close and the appointments are appearing close to where they should be.
I have not used Docker much before but I note that if I run the apps via Visual Studio it uses my SQL Database and if I run Docker it uses another database within the containers - I am a slow learner so it took a while for the penny to drop!
The CORS problem was in Docker only and I made the suggested changes [note: I added builder.AllowAnyOrigin() not builder.AllowAnyHost() ]. I also need to reboot my PC and run Docker from a clean start for the FrontDesk to load the appointment data successfully.
So now I can get on with it!
Once again thanks for taking the time to review this issue.
from pluralsight-ddd-fundamentals.
Those files shouldn't matter too much. Are you able to see the DB calls being made? That should tell you something about what the app is trying to do under the covers. Troubleshooting steps:
- Is EF using the SQL provider and talking to SQL?
- What query is EF using?
- What do you get when you run that query yourself?
- Can you hit the API endpoint yourself and get data that way?
Basically the data needs to make it from the database to the API server to the Blazor Client code and finally be rendered to HTML. Any one of those transitions could fail so start from the database and try to find the failure point. HTH.
from pluralsight-ddd-fundamentals.
I have started from scratch and created both migrations and database updates.
I can confirm that I can get data via Swagger for all endpoints.
From Docker Desktop when I open ddd.frontdesk.blazor the Appointments page is displayed with Client: David Batten and Patient: Max.
No appointments appear for Monday, September 23, 2030. [The seeded data does correspond to this date].
However when I click 'Agenda' all the appointments are displayed correctly for Exam Room 1 / 2 /3.
Exam Room 1: 23 Monday September 2030 11:30 PM - 12:00 AM (WE} Darwin - Steve Smith
That might be a clue - When I click the 'Day' option the time slots displayed start at 7:00am and end 5:00pm.
So maybe the seeded appointments are outside this range and will not be displayed?
Also if I double click in any clear space in the schedule a modal pops up with Appointment Data Title: (WE) Max - David Batten etc. - I cannot see how I can add an appointment - also if I try and delete the appointment that pops up I get an error:
Access to fetch at 'http://localhost:5200/api/schedule/00000000-0000-0000-0000-000000000000/appointments/00000000-0000-0000-0000-000000000000' from origin 'http://localhost:5100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Thanks for taking the time to review this issue.
from pluralsight-ddd-fundamentals.
Adding an appointment is done by first choosing an owner/patient at the top and then just clicking (or maybe double-clicking) on a time in a room. That should bring up a modal window where you choose the appointment type. In the example you're giving with Max - David Batten that's trying to create a Wellness Exam (WE) and I assume you have Max/David chosen at the top. You should be able to save the modal and it should create the appointment, unless there's a problem (like CORS...).
The CORS issue is probably the root of your problem. Since this is a demo app you can just disable CORS by going into the middleware of the web API app and modifying CORS to allow anything.
See: https://learn.microsoft.com/en-us/aspnet/core/security/cors?view=aspnetcore-7.0
Here's where to make the change:
https://github.com/ardalis/pluralsight-ddd-fundamentals/blob/main/FrontDesk/src/FrontDesk.Api/Startup.cs#L87-L97
Add builder.AllowAnyHost()
and remove the WithOrigins
and SetIsOriginAllowed
lines. See if that gets you past the CORS issue and gets other things working too hopefully.
from pluralsight-ddd-fundamentals.
Related Issues (20)
- Add Dependabot
- Add continuous code security and quality analysis
- Add Social Card Image HOT 1
- Diagram: Mind Map with Specification HOT 1
- Consolidate current pipelines into a single pipeline with additional features
- ValueObject to Implement IEquatable<ValueObject> HOT 1
- Telerik credentials are in source control HOT 1
- api/clients is blocked by CORS policy HOT 6
- Unable to use Schedule app. HOT 6
- Version with the todos completed HOT 1
- Delete Appointment endpoint is not deleting appointments HOT 2
- The docker-compose file is incorrect because no version tag. HOT 1
- Using Docker Cannot open database "PluralsightDDD.ClinicManagement" requested by the login. The login failed. HOT 1
- SharedKernel project is not a SharedKernel HOT 2
- Needs to Update after DotNet Conf 2022
- can't delete/update doctors and rooms HOT 1
- Makes sense to get rid of Action scheduleHandler? HOT 1
- Appointments not showing in calendar HOT 5
- Error NU1101 Unable to find package Pluralsight.DDD.Deps. No packages exist with this id in source(s) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pluralsight-ddd-fundamentals.