Finalish updates before sending emails to ISHLT exhibitors
This commit is contained in:
@@ -91,7 +91,7 @@ export let events_loc: Writable<key_val> = localStorageStore('ae_ events_loc', e
|
||||
// Temporary app data. This should be stored to session storage.
|
||||
// Updated 2024-03-06
|
||||
let events_session_data_struct: key_val = {
|
||||
'ver': '2024-03-06_17',
|
||||
'ver': '2024-03-19_17',
|
||||
// Shared
|
||||
'ds': {
|
||||
'submit_status': null,
|
||||
@@ -130,6 +130,24 @@ let events_session_data_struct: key_val = {
|
||||
qr_scan_result: null,
|
||||
},
|
||||
|
||||
'stripe': {
|
||||
'license_qty': 1,
|
||||
'rental_qty': 0,
|
||||
'rental_option': true,
|
||||
'api_use': false,
|
||||
'client_reference_id': null,
|
||||
'publishable_key': 'pk_live_zqaWNDfak2eDHeqnRiyaJcFi',
|
||||
'btn_payment_id': null,
|
||||
'btn_1_license': 'buy_btn_1OvqWJ2gJkNsDuiNqMCWz5nG',
|
||||
'btn_1_license_rental': 'buy_btn_1OvqVA2gJkNsDuiNhk9r8Io2',
|
||||
'btn_3_license': 'buy_btn_1OvrI22gJkNsDuiNXjBg3c4Y',
|
||||
'btn_3_license_rental': 'buy_btn_1OvrKa2gJkNsDuiNhSBCkNau',
|
||||
'btn_6_license': 'buy_btn_1OvrWc2gJkNsDuiN7mnwvZNL',
|
||||
'btn_6_license_rental': 'buy_btn_1OvrXP2gJkNsDuiNZpWZs3Uy',
|
||||
'btn_10_license': 'buy_btn_1OvrPM2gJkNsDuiNRCMHfSuz',
|
||||
'btn_10_license_rental': 'buy_btn_1OvrPs2gJkNsDuiN1nPkjPOM',
|
||||
},
|
||||
|
||||
// Presentation Management (Distributing)
|
||||
|
||||
// Speakers Management (Collection)
|
||||
|
||||
@@ -14,6 +14,83 @@ let event_exhibit_obj = liveQuery(
|
||||
() => db_events.exhibits.get($events_slct.exhibit_id)
|
||||
);
|
||||
|
||||
if (!$events_sess.stripe) {
|
||||
$events_sess.stripe = {};
|
||||
}
|
||||
if (!$events_sess.stripe.license_qty) {
|
||||
$events_sess.stripe.license_qty = 1;
|
||||
$events_sess.stripe.rental_qty = 0;
|
||||
$events_sess.stripe.client_reference_id = $events_slct.exhibit_id;
|
||||
// $events_sess.stripe.btn_payment_id
|
||||
|
||||
console.log(`$events_sess.stripe =`, $events_sess.stripe);
|
||||
}
|
||||
|
||||
// $: if ($events_sess.stripe.rental_option) {
|
||||
// console.log('Rental Option', $events_sess.stripe.rental_option);
|
||||
// if ($events_sess.stripe.rental_option == true && !$events_sess.stripe.rental_qty) {
|
||||
// $events_sess.stripe.rental_qty = 1;
|
||||
// } else if (!$events_sess.stripe.rental_option) {
|
||||
// $events_sess.stripe.rental_qty = 0;
|
||||
// }
|
||||
// } else {
|
||||
// $events_sess.stripe.rental_option = false;
|
||||
// }
|
||||
|
||||
$: if ($events_sess.stripe && $events_sess.stripe.license_qty >= 0 || $events_sess.stripe.rental_qty >= 0) {
|
||||
console.log(`$events_sess.stripe.license_qty=${$events_sess.stripe.license_qty} and $events_sess.stripe.rental_qty=${$events_sess.stripe.rental_qty}`);
|
||||
// $events_sess.stripe.license_qty = parseInt($events_sess.stripe.license_qty);
|
||||
|
||||
// $events_sess.stripe.rental_qty = parseInt($events_sess.stripe.rental_qty);
|
||||
|
||||
if ($events_sess.stripe.rental_qty == 0) {
|
||||
// $events_sess.stripe.rental_qty = 0;
|
||||
|
||||
if ($events_sess.stripe.license_qty == 1) {
|
||||
$events_sess.stripe.btn_payment_id = $events_sess.stripe.btn_1_license;
|
||||
}
|
||||
if ($events_sess.stripe.license_qty == 3) {
|
||||
$events_sess.stripe.btn_payment_id = $events_sess.stripe.btn_3_license;
|
||||
}
|
||||
if ($events_sess.stripe.license_qty == 6) {
|
||||
$events_sess.stripe.btn_payment_id = $events_sess.stripe.btn_6_license;
|
||||
}
|
||||
if ($events_sess.stripe.license_qty == 10) {
|
||||
$events_sess.stripe.btn_payment_id = $events_sess.stripe.btn_10_license;
|
||||
}
|
||||
} else {
|
||||
if ($events_sess.stripe.license_qty == 1) {
|
||||
$events_sess.stripe.btn_payment_id = $events_sess.stripe.btn_1_license_rental;
|
||||
}
|
||||
if ($events_sess.stripe.license_qty == 3) {
|
||||
$events_sess.stripe.btn_payment_id = $events_sess.stripe.btn_3_license_rental;
|
||||
}
|
||||
if ($events_sess.stripe.license_qty == 6) {
|
||||
$events_sess.stripe.btn_payment_id = $events_sess.stripe.btn_6_license_rental;
|
||||
}
|
||||
if ($events_sess.stripe.license_qty == 10) {
|
||||
$events_sess.stripe.btn_payment_id = $events_sess.stripe.btn_10_license_rental;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// We need to force the Stripe Buy Button to reload. I was expecting this to happen automatically lwhent he payment ID changed.
|
||||
console.log(document.getElementById('stripe_buy_button'));
|
||||
|
||||
if (document.getElementById('stripe_buy_button')) {
|
||||
document.getElementById('stripe_buy_button').remove();
|
||||
|
||||
let stripe_buy_button = document.createElement('stripe-buy-button');
|
||||
stripe_buy_button.id = 'stripe_buy_button';
|
||||
stripe_buy_button.setAttribute('buy-button-id', $events_sess.stripe.btn_payment_id);
|
||||
stripe_buy_button.setAttribute('publishable-key', $events_sess.stripe.publishable_key);
|
||||
stripe_buy_button.setAttribute('client-reference-id', $events_sess.stripe.client_reference_id);
|
||||
document.getElementById('stripe_buy_button_container').appendChild(stripe_buy_button);
|
||||
} else {
|
||||
console.log('No Stripe Buy Button found.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -27,89 +104,224 @@ let event_exhibit_obj = liveQuery(
|
||||
|
||||
{#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id]}
|
||||
{#if $event_exhibit_obj?.paid}
|
||||
<h3 class="h4">Paid</h3>
|
||||
<h3 class="h4">Marked as Paid</h3>
|
||||
{:else}
|
||||
<h3 class="h4">Not Paid</h3>
|
||||
<h3 class="h4">Not Marked as Paid</h3>
|
||||
|
||||
<div class="border-2 border-primary p-2 variant-soft-secondary">
|
||||
<p>Please select the number of licenses to purchase and if you need to rent any tablets for scanning. As a reminder, you can use your own device (cell phone, tablet, laptop, etc) to scan the QR codes on the badges of the attendees. Tablet rentals are limited in supply for ISHLT 2024 in Prague and will be given out on a first come first served basis.</p>
|
||||
</div>
|
||||
|
||||
<script async
|
||||
src="https://js.stripe.com/v3/buy-button.js">
|
||||
</script>
|
||||
|
||||
<!-- <div class="fle"> -->
|
||||
<div class="w-2/3">
|
||||
<label>
|
||||
Select number of licenses to purchase:<br>
|
||||
<select
|
||||
id="license_qty"
|
||||
name="license_qty"
|
||||
bind:value={$events_sess.stripe.license_qty}
|
||||
class="select max-w-72"
|
||||
>
|
||||
<option value={1}>
|
||||
1 user license - $120
|
||||
</option>
|
||||
<option value={3}>
|
||||
Up to 3 user licenses - $330
|
||||
</option>
|
||||
<option value={6}>
|
||||
Up to 6 user licenses - $660
|
||||
</option>
|
||||
<option value={10}>
|
||||
Up to 10 user licenses - $1,100
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
<p class="text-sm">Each person associated with your exhibit needs a license to use the lead retrieval service for exhibitors.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<!-- <div>
|
||||
CHK Do you need to rent tablets as well?
|
||||
<input
|
||||
type="checkbox"
|
||||
name="rental_option"
|
||||
value="testing"
|
||||
bind:checked={$events_sess.stripe.rental_option}
|
||||
on:click={() => {
|
||||
console.log('Rental Option', $events_sess.stripe.rental_option);
|
||||
// $events_sess.stripe.rental_qty = 0;
|
||||
}}
|
||||
>
|
||||
</div> -->
|
||||
|
||||
<!-- {#if $events_sess.stripe.rental_qty > 0} -->
|
||||
<!-- <div> -->
|
||||
<!-- Do you need to rent tablets as well?
|
||||
<input
|
||||
type="checkbox"
|
||||
name="rental_option"
|
||||
value={true}
|
||||
bind:checked={$events_sess.stripe.rental_option}
|
||||
on:click={() => {
|
||||
console.log('Rental Option');
|
||||
if ($events_sess.stripe.rental_option) {
|
||||
$events_sess.stripe.rental_qty = 1;
|
||||
} else {
|
||||
$events_sess.stripe.rental_qty = 0;
|
||||
}
|
||||
// $events_sess.stripe.rental_qty = 0;
|
||||
}}
|
||||
> -->
|
||||
|
||||
<!-- <button on:click={() => {
|
||||
console.log('License(s) Only');
|
||||
$events_sess.stripe.rental_qty = 0;
|
||||
}}
|
||||
class="btn variant-soft-secondary"
|
||||
>
|
||||
License(s) Only
|
||||
</button> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<div class="w-2/3">
|
||||
<label>
|
||||
Select number of tablets to rent:<br>
|
||||
<select
|
||||
id="rental_qty"
|
||||
name="rental_qty"
|
||||
bind:value={$events_sess.stripe.rental_qty}
|
||||
class="select max-w-52"
|
||||
>
|
||||
<option value={0}>No tablet rentals - $0</option>
|
||||
<option value={1}>1 tablet - $115</option>
|
||||
<option value={2}>2 tablets - $230</option>
|
||||
<option value={3}>3 tablets - $345</option>
|
||||
<option value={4}>4 tablets - $460</option>
|
||||
<option value={5}>5 tablets - $575</option>
|
||||
<option value={6}>6 tablets - $690</option>
|
||||
<option value={7}>7 tablets - $805</option>
|
||||
<option value={8}>8 tablets - $920</option>
|
||||
<option value={9}>9 tablets - $1,035</option>
|
||||
<option value={10}>10 tablets - $1,150</option>
|
||||
</select>
|
||||
</label>
|
||||
<p class="text-sm">You can use your own device(s) with this service. Renting tablets for scanning is not required.</p>
|
||||
</div>
|
||||
|
||||
<!-- {:else} -->
|
||||
|
||||
<!-- <div>
|
||||
BTN Do you need to rent tablets as well?
|
||||
<button on:click={() => {
|
||||
console.log('License(s) with Tablet Rental');
|
||||
$events_sess.stripe.rental_qty = 1;
|
||||
}}
|
||||
class="btn variant-soft-secondary"
|
||||
>
|
||||
License(s) with Tablet Rental
|
||||
</button>
|
||||
</div> -->
|
||||
<!-- {/if} -->
|
||||
|
||||
|
||||
{#if $events_sess.stripe.btn_payment_id}
|
||||
<div id="stripe_buy_button_container" class="w-2/3">
|
||||
<stripe-buy-button
|
||||
id="stripe_buy_button"
|
||||
buy-button-id={$events_sess.stripe.btn_payment_id}
|
||||
publishable-key={$events_sess.stripe.publishable_key}
|
||||
client-reference-id={$events_sess.stripe.client_reference_id}
|
||||
|
||||
>
|
||||
</stripe-buy-button>
|
||||
<p class="text-sm">You have selected to purchase {$events_sess.stripe.license_qty} user license(s) and rent {$events_sess.stripe.rental_qty} tablet(s). Press the button above to pay by credit card, debit card, or ACH direct debit.</p>
|
||||
<p class="text-sm variant-soft-warning"><strong>WARNING:</strong> Please be sure to double check and update the quantities on the next page.</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
<div class="border-2 border-primary p-2 variant-soft-warning">
|
||||
<p><strong>NOTE:</strong> Your payment will be reviewed and is not reflected immediately on this page for your exhibit. It may take up to 2 business days for this to show as being paid. If you have any questions or concerns please email <a href="mailto:exhibits@oneskyit.com" class="text-blue-500">exhibits@oneskyit.com</a>.</p>
|
||||
</div>
|
||||
|
||||
<!-- <div>
|
||||
1 user license<br>
|
||||
<stripe-buy-button
|
||||
buy-button-id="buy_btn_1OvqWJ2gJkNsDuiNqMCWz5nG"
|
||||
publishable-key="pk_live_zqaWNDfak2eDHeqnRiyaJcFi"
|
||||
>
|
||||
</stripe-buy-button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<!-- <div>
|
||||
1 user license with tablet rental<br>
|
||||
<stripe-buy-button
|
||||
buy-button-id="buy_btn_1OvqVA2gJkNsDuiNhk9r8Io2"
|
||||
publishable-key="pk_live_zqaWNDfak2eDHeqnRiyaJcFi"
|
||||
>
|
||||
</stripe-buy-button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<!-- <div>
|
||||
Up to 3 user licenses<br>
|
||||
<stripe-buy-button
|
||||
buy-button-id="buy_btn_1OvrI22gJkNsDuiNXjBg3c4Y"
|
||||
publishable-key="pk_live_zqaWNDfak2eDHeqnRiyaJcFi"
|
||||
>
|
||||
</stripe-buy-button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<!-- <div>
|
||||
Up to 3 user licenses with tablet rental<br>
|
||||
<stripe-buy-button
|
||||
buy-button-id="buy_btn_1OvrKa2gJkNsDuiNhSBCkNau"
|
||||
publishable-key="pk_live_zqaWNDfak2eDHeqnRiyaJcFi"
|
||||
>
|
||||
</stripe-buy-button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<hr>
|
||||
<!-- <hr> -->
|
||||
|
||||
<div>
|
||||
<!-- <div>
|
||||
Up to 6 user licenses<br>
|
||||
<stripe-buy-button
|
||||
buy-button-id="buy_btn_1OvrWc2gJkNsDuiN7mnwvZNL"
|
||||
publishable-key="pk_live_zqaWNDfak2eDHeqnRiyaJcFi"
|
||||
>
|
||||
</stripe-buy-button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<!-- <div>
|
||||
Up to 6 user licenses with tablet rental<br>
|
||||
<stripe-buy-button
|
||||
buy-button-id="buy_btn_1OvrXP2gJkNsDuiNZpWZs3Uy"
|
||||
publishable-key="pk_live_zqaWNDfak2eDHeqnRiyaJcFi"
|
||||
>
|
||||
</stripe-buy-button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<!-- <div>
|
||||
Up to 10 user licenses<br>
|
||||
<stripe-buy-button
|
||||
buy-button-id="buy_btn_1OvrPM2gJkNsDuiNRCMHfSuz"
|
||||
publishable-key="pk_live_zqaWNDfak2eDHeqnRiyaJcFi"
|
||||
>
|
||||
</stripe-buy-button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<!-- <div>
|
||||
Up to 10 user licenses with tablet rental<br>
|
||||
<stripe-buy-button
|
||||
buy-button-id="buy_btn_1OvrPs2gJkNsDuiN1nPkjPOM"
|
||||
publishable-key="pk_live_zqaWNDfak2eDHeqnRiyaJcFi"
|
||||
>
|
||||
</stripe-buy-button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user