| 1 | <templates> |
| 2 | |
| 3 | <t t-inherit="loyalty.portal_loyalty_card_dialog" t-inherit-mode="extension"> |
| 4 | <div name="history_lines" position="after"> |
| 5 | <div |
| 6 | t-if="props.program.program_type == 'loyalty'" |
| 7 | t-foreach="props.rewards" |
| 8 | t-as="reward" |
| 9 | t-key="reward_index" |
| 10 | class="mb-2 mt-2" |
| 11 | > |
| 12 | <div class="d-flex border rounded align-items-center justify-content-center p-2"> |
| 13 | <div class="flex-fill fs-6"> |
| 14 | <t t-out="reward.description"/> |
| 15 | </div> |
| 16 | <span class="text-primary" t-out="reward.points"/> |
| 17 | </div> |
| 18 | </div> |
| 19 | <div t-if="props.rewards.length > 0" class="d-flex justify-content-center"> |
| 20 | <a |
| 21 | t-if="props.program.program_type == 'loyalty'" |
| 22 | type="button" |
| 23 | href="/shop" |
| 24 | class="btn btn-primary" |
| 25 | > |
| 26 | Claim |
| 27 | </a> |
| 28 | </div> |
| 29 | <div |
| 30 | t-if="props.program.program_type == 'ewallet' |
| 31 | and props.program.trigger_products.length" |
| 32 | > |
| 33 | <form |
| 34 | method="post" |
| 35 | action="/wallet/top_up" |
| 36 | class="d-flex w-75 w-md-50 m-auto gap-1" |
| 37 | > |
| 38 | <input type="hidden" name="csrf_token" t-att-value="csrf_token"/> |
| 39 | <select name="trigger_product_id" class="form-select"> |
| 40 | <t |
| 41 | t-foreach="props.program.trigger_products" |
| 42 | t-as="product" |
| 43 | t-key="product_index" |
| 44 | > |
| 45 | <option t-att-value="product.id"> |
| 46 | <t t-esc="product.total_price"/> |
| 47 | </option> |
| 48 | </t> |
| 49 | </select> |
| 50 | <button type="submit" class="btn btn-primary text-nowrap">Top Up</button> |
| 51 | </form> |
| 52 | </div> |
| 53 | </div> |
| 54 | </t> |
| 55 | |
| 56 | </templates> |