You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something like this, but probably with bigger more legible text. Make sure it's responsive!
Tips:
Create a new Vue component called something like DraftBanner in /resources/js/Components. It shouldn't need any props. You could use the ProgressBar component as an example, and this one would be even simpler. You'll probably want the component to be display: fixed; so it doesn't interfere with how the slide rendering works.
Edit the PresentationController#show action to add in a new property that gets sent via Inertia, called isPublished. Use the presentation's is_published value to set that property
Edit the resources/js/Pages/Slides.vue file to accept the new prop, and then render the DraftBanner component right before the SlideView component only if the presentation is not published
Lastly, add some tests! I can think of 2 front-end tests to add, and 2 back-end tests to add, and if you think of more, add them:
Front-End Tests to Add
See resources/js/test/components and create a new file for SlidePage.test.ts
Test that the DraftBanner component is there if the isPublished prop is set to true
Test that the DraftBanner component is not there if the isPublished prop is set to false
Back-End Tests
Augment the existing test/Feature/PresentationControllerTest.php file
Test the the inertia response includes isPublished = true for a published presentation. See the test titled show screen returns the right view and data for how to assert Inertia responses.
Test the the inertia response includes isPublished = false for a non-published presentation. See the test titled show screen returns the right view and data for how to assert Inertia responses.
The text was updated successfully, but these errors were encountered:
Something like this, but probably with bigger more legible text. Make sure it's responsive!
Tips:
/resources/js/Components
. It shouldn't need any props. You could use theProgressBar
component as an example, and this one would be even simpler. You'll probably want the component to bedisplay: fixed;
so it doesn't interfere with how the slide rendering works.PresentationController#show
action to add in a new property that gets sent via Inertia, calledisPublished
. Use the presentation'sis_published
value to set that propertyresources/js/Pages/Slides.vue
file to accept the new prop, and then render the DraftBanner component right before theSlideView
component only if the presentation is not publishedFront-End Tests to Add
See
resources/js/test/components
and create a new file forSlidePage.test.ts
DraftBanner
component is there if theisPublished
prop is set to trueDraftBanner
component is not there if theisPublished
prop is set to falseBack-End Tests
Augment the existing
test/Feature/PresentationControllerTest.php
fileisPublished = true
for a published presentation. See the test titledshow screen returns the right view and data
for how to assert Inertia responses.isPublished = false
for a non-published presentation. See the test titledshow screen returns the right view and data
for how to assert Inertia responses.The text was updated successfully, but these errors were encountered: