-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
注文画面の UI や確認ダイアログの追加 #65
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c423c2b
注文画面のダイアログの追加
SuzuSys 209e9e9
Merge branch 'develop2' of https://github.com/SuzuSys/murchace into d…
SuzuSys bdb77aa
Fix orders.html
SuzuSys 5854a39
Fix templates.py
SuzuSys d282ea4
お買い上げ点数の表示
SuzuSys a0cd8d8
fix format
SuzuSys bd964f4
fix styles.css and styles.min.css
SuzuSys 3cfb209
Move ProductCompact class to app/store/product.py
exflikt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{% macro order_confirm(session_id, products, count, total_price, placement_status) %} | ||
<div class="relative z-10" aria-labelledby="confirm-dialog" role="dialog" aria-modal="true"> | ||
|
||
<!-- background --> | ||
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div> | ||
<div class="fixed inset-0 z-10 w-screen"> | ||
<div class="flex h-full items-end justify-center py-4 px-10 text-center"> | ||
|
||
<!-- dialog --> | ||
<div class="flex flex-col overflow-y-auto transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all max-h-full"> | ||
<!-- text area wrapper --> | ||
<div class="flex flex-col overflow-y-auto bg-white px-4 pb-4 pt-5"> | ||
<!-- text area --> | ||
{% if placement_status == "" %} | ||
<div class="flex flex-col overflow-y-auto mt-1 text-center"> | ||
<h3 class=" font-semibold leading-6 text-gray-900 text-lg">注文の確定</h3> | ||
<div class="flex flex-col overflow-y-auto mt-5"> | ||
<ul class="flex flex-col overflow-y-auto mx-1 px-3"> | ||
{% for product in products.values() %} | ||
<li class="flex flex-row justify-between items-start gap-x-6 text-lg"> | ||
<span class="break-words">{{ product.name }}</span> | ||
<span class="whitespace-nowrap">{{ product.price }} x {{ product.count }}</span> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<p class="flex flex-row mx-1 px-3 mt-5 justify-between text-lg"> | ||
<span class="break-words">計</span> | ||
<span class="whitespace-nowrap">{{ count }} 点</span> | ||
</p> | ||
<p class="flex flex-row mx-1 px-3 justify-between text-lg"> | ||
<span class="break-words">合計金額</span> | ||
<span class="whitespace-nowrap">{{ total_price }}</span> | ||
</p> | ||
</div> | ||
</div> | ||
{% else %} | ||
{{ placement_status }} | ||
{% endif %} | ||
</div> | ||
<!-- control --> | ||
<div class="flex-none bg-gray-50 px-4 py-3"> | ||
<button | ||
type="button" | ||
hx-post="/orders/{{ session_id }}" | ||
hx-target="#order-session" | ||
class="inline-flex w-full justify-center rounded bg-blue-600 px-8 py-4 text-xl font-semibold text-white shadow-sm" | ||
>確認</button> | ||
<button | ||
type="button" | ||
onclick="htmx.swap('#order-confirm', '', {swapStyle: 'innerHTML'})" | ||
class="mt-3 inline-flex w-full justify-center rounded bg-white px-5 py-4 text-xl font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300" | ||
>キャンセル</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endmacro %} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ProductCompact
クラスは app/templates.py じゃなくて app/store/product.py に定義しちゃっていいと思います。