-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-host-issue
- Loading branch information
Showing
19 changed files
with
125 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div id="<%= dom_id(page, :index) %>" class="bg-white rounded-md shadow p-4"> | ||
<%= turbo_stream_from page %> | ||
<%= render page %> | ||
<%= link_to "View", page, class: "btn btn-white" %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div id="<%= dom_id page %>"> | ||
<h3 > | ||
<%= page.name %> | ||
</h3> | ||
<div class="mb-4"> | ||
<p class="text-sm font-medium text-gray-500 mb-2">Supports Auto Fill for <%= page.form_fields.count%> fields</p> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
json.extract! page, :id, :template_id, :name, :created_at, :updated_at | ||
json.url page_url(page, format: :json) | ||
json.form_fields page.form_fields do |form_field| | ||
json.partial! "form_fields/form_field", form_field: form_field | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<%= content_for :title, "Pages" %> | ||
<%= turbo_stream_from :pages %> | ||
<div class="container px-4 mx-auto my-8"> | ||
<div class="flex items-center justify-between mb-4"> | ||
<div> | ||
<h1 class="h3"> | ||
<%= link_to @template.name, template_path(@template), class: "text-black" %> | ||
<span class="text-gray-400 font-light mx-2">\</span> | ||
Pages | ||
</h1> | ||
<div class="text-sm font-medium"> | ||
<span class="text-gray-500">Sort by:</span> | ||
<%= sortable @pages, :template_id, "Template", class: "text-gray-700" %> | ||
<%= sortable @pages, :name, "Name", class: "text-gray-700" %> | ||
</div> | ||
</div> | ||
</div> | ||
<%= tag.div id: ("pages" if first_page?), class: "space-y-4" do %> | ||
<%= render partial: "pages/index", collection: @pages, as: :page, cached: true %> | ||
<div class="hidden only:flex flex-col items-center justify-between lg:flex-row"> | ||
<%= image_tag "empty.svg", class: "mb-4 lg:w-1/2" %> | ||
</div> | ||
<% end %> | ||
<% if @pagy.pages > 1 %> | ||
<div class="my-6 text-center"> | ||
<%== pagy_nav(@pagy) %> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
json.array! @pages, partial: "pages/page", as: :page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<script src="https://medispeak-app.pages.dev/assets/index.html.js" crossorigin="" type="module"></script> | ||
<link rel="modulepreload" crossorigin="" href="https://medispeak-app.pages.dev/assets/App.js"> | ||
<link rel="stylesheet" href="https://medispeak-app.pages.dev/assets/App.css"> | ||
<%= content_for :title, "Pages ##{@page.id}" %> | ||
<%= turbo_stream_from @page %> | ||
<div class="container px-4 mx-auto my-8"> | ||
<div class="flex items-center justify-between mb-4"> | ||
<h1 class="h3"> | ||
<%= link_to @page.template.name, template_path(@page.template), class: "text-black" %> | ||
<span class="text-gray-400 font-light mx-2">\</span> | ||
<%= @page.name %> | ||
</h1> | ||
</div> | ||
<div class="p-8 bg-white rounded shadow"> | ||
<%= render @page %> | ||
</div> | ||
<div class="mt-4 max-w-xl p-8 space-y-4 bg-white rounded shadow"> | ||
<% @page.form_fields.each do |form_filed| %> | ||
<div> | ||
<label for="<%=form_filed.title%>" class="block text-sm font-medium leading-6 text-gray-900"><%=form_filed.title%></label> | ||
<div class="mt-1"> | ||
<input type="text" name="<%=form_filed.title%>" id="<%=form_filed.title%>" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" placeholder="<%=form_filed.description%>" aria-describedby="email-description"> | ||
</div> | ||
<p class="mt-1 text-sm text-gray-500" id="email-description"><%=form_filed.description%></p> | ||
</div> | ||
<% end%> | ||
<% if @page.form_fields.empty? %> | ||
<div class="flex items-center justify-between mb-4"> | ||
<div class="text-sm font-semibold"> | ||
Please contact our support team to add form fields to this page. | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
<div id="medispeak_root"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
json.partial! "pages/page", page: @page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Rails.application.config.middleware.insert_before 0, Rack::Cors do | ||
allow do | ||
origins '*' | ||
resource '*', headers: :any, methods: [:get, :post, :patch, :put] | ||
Check failure on line 4 in config/initializers/cors.rb
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters