tf-checkout-react 1.0.77 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +1 -0
- package/dist/components/common/FormikPhoneNumberField.d.ts +1 -1
- package/dist/components/countdown/index.d.ts +11 -0
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +13 -1
- package/dist/components/ticketsContainer/index.d.ts +2 -1
- package/dist/components/waitingList/index.d.ts +1 -2
- package/dist/tf-checkout-react.cjs.development.js +352 -117
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +352 -117
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/utils/downloadPDF.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -1
- package/src/api/index.ts +9 -0
- package/src/components/common/FormikPhoneNumberField.tsx +2 -1
- package/src/components/countdown/index.tsx +89 -0
- package/src/components/countdown/style.css +10 -0
- package/src/components/loginModal/index.tsx +2 -0
- package/src/components/orderDetailsContainer/ticketsTable.tsx +66 -60
- package/src/components/ticketsContainer/PromoCodeSection.tsx +3 -2
- package/src/components/ticketsContainer/TicketsSection.tsx +10 -6
- package/src/components/ticketsContainer/index.tsx +131 -25
- package/src/components/ticketsContainer/style.css +7 -0
- package/src/components/waitingList/index.tsx +3 -9
- package/src/components/waitingList/style.css +4 -2
- package/src/utils/downloadPDF.tsx +22 -0
- package/src/utils/index.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.button-container{display:flex;justify-content:center;padding:20px}.billing-info-container{margin:0 auto;max-width:800px}.billing-info-container .is-half{width:49%}.billing-info-container p{color:#000}.billing-info-container .main-header{font-size:2rem;font-weight:600}.billing-info-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.billing-info-container__singleField{margin-top:15px}.account-actions-block{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.login-register-button,.MuiButtonBase-root.MuiButton-root,.MuiButtonBase-root.MuiButton-root:hover{background-color:#212529;border:#f28051;border-radius:5px;color:#fff;cursor:pointer;display:block;font-family:Inter-Bold;font-size:26px;font-weight:700;line-height:1.15;margin-top:10px;min-height:46px;outline:none;overflow:hidden;padding:14px 12px 12px;position:relative;text-align:center;text-overflow:ellipsis;text-transform:uppercase;width:49%}.logo-image-container{margin-top:5px;text-align:center;width:49%}.logo-image-container img{height:30px}.login-block{align-items:center;display:flex;flex-direction:column}.login-register-button:hover{background-color:#505050!important;border-color:#505050!important}.login-register-block{display:flex;justify-content:space-between}@media only screen and (max-width:820px){.billing-info-container{width:90%}.billing-info-container .main-header{font-size:1.5rem}}.email-checking{margin-bottom:15px}.modal-title{align-items:center;background-color:#fff;display:flex;font-family:Inter;font-size:18px;font-weight:700;height:49px;line-height:22px;padding-left:25px;position:relative}.login-modal-body{padding:15px 25px}.login-modal-body input{background:#fff!important}.login-modal-body__email,.login-modal-body__password{margin-bottom:20px}.login-action-button button{background-color:#212529;border:none;border-radius:0;color:#fff;cursor:pointer;font-size:26px;font-weight:600;height:45px;line-height:18px;margin:10px 0;outline:none;padding:10px;width:100%}.login-action-button button:hover{background-color:#505050;border-color:#505050}.server_auth__error{color:red;font-family:Inter;font-size:12px;font-style:normal;padding-left:25px;padding-top:15px}.info-text-for-login{font-size:14px;margin-bottom:4px;padding-left:10px}.register-container{margin:0 auto;max-width:800px}.register-container .is-half{width:49%}.register-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.register-container__singleField{margin-top:15px}button{margin-top:10px}.payment_page{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.payment_page .order_info_section{padding:15px 0}.payment_page .order_info_section .order_info_block{padding-bottom:15px;padding-top:15px}.payment_page .order_info_section .order_info_block .field-underline{border-bottom:1px solid #000;padding-bottom:15px}.payment_page .order_info_section .order_info_block .order_info_title{font-size:14px;font-weight:700;padding-bottom:3px}.payment_page .order_info_section .order_info_block .order_info_text{font-size:16px;line-height:1.15;outline:none}.payment_page .MuiBox-root{margin-left:auto;margin-right:auto;padding:20px;text-align:center}.payment_page .payment_info_label{padding:20px 0;text-align:center}.payment_page .payment_form{color:#fff;padding:20px}.payment_page .payment_form input,.payment_page .payment_form label{color:#fff}.payment_page .payment_button{padding-top:20px;text-align:center}.card_form_inner{background:#232323;border-radius:8px;margin:0 auto 20px;min-width:325px;padding:15px;width:50%}.card_form_inner .card_label_text{color:#fff}.card_form_inner .StripeElement{margin:5px 0 10px}.card_label_text{color:#fff}.payment_button{padding-top:15px;text-align:center}.payment_button button{background-color:#212529;border-radius:8px;color:#fff;cursor:pointer;font-size:26px;padding:15px 30px;transition:opacity .5s;width:200px}.payment_button button:hover{opacity:.7}.disabled-payment-button button{opacity:.3;pointer-events:none;user-select:none}.checkout_error_block{color:#e53935;font-weight:600;padding:15px 0}.zip_element p{margin-bottom:0}.zip_element input{background-color:#000;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}.confirmation-page{margin:0 auto;max-width:1024px}.confirmation-page button{margin-top:inherit}.confirmation-page .strong-text{font-weight:700}.confirmation-page .title{color:#333;font-size:24px;font-weight:600}.confirmation-page .share-message-section{background:#dff0d8;border:1px solid #d6e9c6;border-radius:5px;color:#2c7221;display:flex;flex-direction:column;margin:20px 0;padding:15px}.confirmation-page .main{font-size:15px;font-weight:700}.confirmation-page .helper,.confirmation-page .main{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.confirmation-page .helper{font-size:14px;margin-top:5px}.confirmation-page .referral_text_image_section{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin:20px 0}.confirmation-page .referral_text_section{margin:10px}.confirmation-page .referral_title_text{color:#f08057;font-size:28px;padding-bottom:10px}.confirmation-page .referral_text{font-size:18px}.confirmation-page .referral_text_image_section img{margin:10px;max-width:200px}.confirmation-page .share_wrapper{column-gap:5rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin:10px}.confirmation-page .invitation_title{font-size:22px;padding-bottom:12px;padding-top:12px}.confirmation-page .share_section{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 -10px}.confirmation-page .invitation_section{flex:1 1;padding:0 5px}.confirmation-page .share_buttons{display:grid;flex-wrap:wrap;margin:0 -7px}.confirmation-page .convenient_buttons{margin-top:10px}.confirmation-page .social-media-btns{grid-gap:5px;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.confirmation-page .sharing-btn{background-color:#000;flex:1 1;min-width:130px}.confirmation-page .sharing-btn a{text-decoration:none}.confirmation-page .share-by-link{background:#000;color:#fff;padding:10px}.confirmation-page .share-by-link.label{margin:0;padding:0;text-align:left}.confirmation-page .share-btn-inner{align-items:center;background-color:#000;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-flex;padding:0;text-align:left;width:100%}.confirmation-page .share-input{background-color:#fff;border:none;outline:none;padding:5px;text-align:left;width:300px}.confirmation-page .share-text{display:block;font-size:13px;font-weight:600;padding-top:8px;width:100%}.confirmation-page .pricing-section_wrapper{background:#e3e3e3;border:1px solid #dcdcdc;display:grid;grid-template-columns:1fr 1fr;margin:10px 0;padding:15px}.confirmation-page .pricing-section_label{font-weight:600}.confirmation-page .pricing-section_sublabel{font-size:14px;font-weight:100}.confirmation-page .pricing-section_price{font-weight:600;text-align:right}.confirmation-page .share-by-link-copy-icon{align-items:center;background-color:#32325d;border-radius:4px;color:#fff;cursor:pointer;display:flex;justify-content:center;margin-left:8px;padding:10px;transition:all .15s ease}.confirmation-page .share-by-link-copy-icon:hover{background-color:#505050}.confirmation-page .share-by-link-copy-icon img{width:14px}.confirmation-page .social-media-sharing{background-color:#000;color:#fff;cursor:pointer;padding:10px;text-align:center}.confirmation-page .share-icon{border-radius:4px;display:inline-flex}@media only screen and (max-width:1050px){.confirmation-page .share_wrapper{column-gap:0;display:grid;grid-template-columns:unset;margin:15px}}@media only screen and (max-width:480px){.confirmation-page .social-media-btns{grid-template-columns:unset}.confirmation-page .share-input{width:250px}}body{margin:0;padding:0}.get-tickets-page{width:100%}.event-detail__tier{background-color:#fff;padding:17px 35px 20px}.event-detail__tier-name{color:#000;font-family:Inter-Bold;font-family:Bebas Neue;font-size:.85rem;font-weight:700;letter-spacing:.2em;line-height:1.3;margin-bottom:8px;margin-top:16px;padding-right:20%;text-transform:uppercase}.event-detail__tier-status{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;margin-top:8px;width:100%}.event-detail__tier-status.ticket-button{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;font-weight:700;letter-spacing:.2em;line-height:1.5;margin-bottom:10px;width:200px}.event-tickets-container{align-items:center;display:flex;justify-content:space-between}.event-detail__tier-status.ticket-button.true{background-color:#c1c3c6;border-color:#afb0b1}.event-detail__tier-price{color:#000;font-family:Inter-Bold;font-size:1.5rem;line-height:1;text-align:center}.event-detail__tier-price p{margin:0}.event-detail__tier-price .fees{font-size:14px;margin-top:4px;text-align:left}.event-detail__tier-price .old-price{color:red;font-size:1.3rem;margin-bottom:5px;text-decoration:line-through}.alert-info{align-items:center;background-color:#d9edf7;border:1px solid #bce8f1;border-radius:4px;color:#3a87ad;display:flex;font-size:1em;justify-content:center;margin:0 35px;padding:8px 15px;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.alert-info svg{margin-right:4px}.event-detail__tier-state{color:#30bc9d;font-family:Inter-Bold;font-size:.75rem;font-weight:300;line-height:1;text-align:right;text-transform:uppercase}.promo-code-block input{font-size:14px;padding:1px 8px}.book-button{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;display:block;font-size:26px;font-weight:700;height:50px;letter-spacing:.2em;line-height:1.5;margin:25px auto 10px;text-align:center;width:100%}.book-button:hover{background-color:#505050;border-color:#505050}.loader-container{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.get-tickets-paper::-webkit-scrollbar{width:5px}.get-tickets-paper::-webkit-scrollbar-track{background:#f1f1f1}.get-tickets-paper::-webkit-scrollbar-thumb{background:#888}.get-tickets-paper::-webkit-scrollbar-thumb:hover{background:#555}.get-tickets .get-tickets__selectbox{width:100%}.disabled{pointer-events:none;user-select:none}.hidden{display:none}.waiting-list{padding:17px 35px 20px}.waiting-list .field-item{margin-bottom:30px}.waiting-list .waiting-list-button{width:100%!important}.waiting-list .waiting-list-button:hover{background-color:#505050}.waiting-list .success-message h3{margin:10px 0}.waiting-list .success-message p{margin:0}.waiting-list .no-tickets-text{font-weight:700;text-align:center}.waiting-list .added-success-message{font-size:22px}.my-ticket{padding:30px}.my-ticket-table{margin-top:30px}.my-ticket .loading{background-color:rgba(0,0,0,.4);height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100%}.my-ticket .event-info,.my-ticket .loading{align-items:center;display:flex}.my-ticket thead th{font-weight:700}.my-ticket .event-info img{margin-right:10px;width:50px}.my-ticket .order-details-button{background-color:#32325d;border:none;border-radius:4px;color:#fff;cursor:pointer;padding:10px 14px;transition:all .15s ease}.my-ticket .order-details-button:hover{background-color:#505050}.order-details{margin:0 auto;max-width:940px}.order-details .loading{align-items:center;background-color:rgba(0,0,0,.4);display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100%}.order-details .layout-title{font-size:24px;font-weight:400}.order-details .sub-title{font-size:18px;font-weight:400;margin:10px 0}.order-details .order-summary-box{margin-top:30px}.order-details .total-row td,.order-details th{color:#fff;font-weight:700}.order-details .tickets-box{margin-top:30px}.order-details .ticket-add-on-table{background-color:#fcf8e3}.order-details .download-button{background-color:#212529;border:1px solid #fff;border-radius:0;color:#fff;cursor:pointer;display:block;font-family:Bebas Neue;font-size:16px;font-weight:400;line-height:normal;margin-bottom:20px;margin-top:20px;min-height:auto;outline:none;overflow:hidden;padding:12px 0;position:relative;text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:uppercase;width:100%}.order-details .download-button:hover{background-color:#505050}.order-details .personal-link{padding:20px 0}
|
|
1
|
+
.button-container{display:flex;justify-content:center;padding:20px}.billing-info-container{margin:0 auto;max-width:800px}.billing-info-container .is-half{width:49%}.billing-info-container p{color:#000}.billing-info-container .main-header{font-size:2rem;font-weight:600}.billing-info-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.billing-info-container__singleField{margin-top:15px}.account-actions-block{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.login-register-button,.MuiButtonBase-root.MuiButton-root,.MuiButtonBase-root.MuiButton-root:hover{background-color:#212529;border:#f28051;border-radius:5px;color:#fff;cursor:pointer;display:block;font-family:Inter-Bold;font-size:26px;font-weight:700;line-height:1.15;margin-top:10px;min-height:46px;outline:none;overflow:hidden;padding:14px 12px 12px;position:relative;text-align:center;text-overflow:ellipsis;text-transform:uppercase;width:49%}.logo-image-container{margin-top:5px;text-align:center;width:49%}.logo-image-container img{height:30px}.login-block{align-items:center;display:flex;flex-direction:column}.login-register-button:hover{background-color:#505050!important;border-color:#505050!important}.login-register-block{display:flex;justify-content:space-between}@media only screen and (max-width:820px){.billing-info-container{width:90%}.billing-info-container .main-header{font-size:1.5rem}}.email-checking{margin-bottom:15px}.modal-title{align-items:center;background-color:#fff;display:flex;font-family:Inter;font-size:18px;font-weight:700;height:49px;line-height:22px;padding-left:25px;position:relative}.login-modal-body{padding:15px 25px}.login-modal-body input{background:#fff!important}.login-modal-body__email,.login-modal-body__password{margin-bottom:20px}.login-action-button button{background-color:#212529;border:none;border-radius:0;color:#fff;cursor:pointer;font-size:26px;font-weight:600;height:45px;line-height:18px;margin:10px 0;outline:none;padding:10px;width:100%}.login-action-button button:hover{background-color:#505050;border-color:#505050}.server_auth__error{color:red;font-family:Inter;font-size:12px;font-style:normal;padding-left:25px;padding-top:15px}.info-text-for-login{font-size:14px;margin-bottom:4px;padding-left:10px}.register-container{margin:0 auto;max-width:800px}.register-container .is-half{width:49%}.register-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.register-container__singleField{margin-top:15px}button{margin-top:10px}.payment_page{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.payment_page .order_info_section{padding:15px 0}.payment_page .order_info_section .order_info_block{padding-bottom:15px;padding-top:15px}.payment_page .order_info_section .order_info_block .field-underline{border-bottom:1px solid #000;padding-bottom:15px}.payment_page .order_info_section .order_info_block .order_info_title{font-size:14px;font-weight:700;padding-bottom:3px}.payment_page .order_info_section .order_info_block .order_info_text{font-size:16px;line-height:1.15;outline:none}.payment_page .MuiBox-root{margin-left:auto;margin-right:auto;padding:20px;text-align:center}.payment_page .payment_info_label{padding:20px 0;text-align:center}.payment_page .payment_form{color:#fff;padding:20px}.payment_page .payment_form input,.payment_page .payment_form label{color:#fff}.payment_page .payment_button{padding-top:20px;text-align:center}.card_form_inner{background:#232323;border-radius:8px;margin:0 auto 20px;min-width:325px;padding:15px;width:50%}.card_form_inner .card_label_text{color:#fff}.card_form_inner .StripeElement{margin:5px 0 10px}.card_label_text{color:#fff}.payment_button{padding-top:15px;text-align:center}.payment_button button{background-color:#212529;border-radius:8px;color:#fff;cursor:pointer;font-size:26px;padding:15px 30px;transition:opacity .5s;width:200px}.payment_button button:hover{opacity:.7}.disabled-payment-button button{opacity:.3;pointer-events:none;user-select:none}.checkout_error_block{color:#e53935;font-weight:600;padding:15px 0}.zip_element p{margin-bottom:0}.zip_element input{background-color:#000;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}.confirmation-page{margin:0 auto;max-width:1024px}.confirmation-page button{margin-top:inherit}.confirmation-page .strong-text{font-weight:700}.confirmation-page .title{color:#333;font-size:24px;font-weight:600}.confirmation-page .share-message-section{background:#dff0d8;border:1px solid #d6e9c6;border-radius:5px;color:#2c7221;display:flex;flex-direction:column;margin:20px 0;padding:15px}.confirmation-page .main{font-size:15px;font-weight:700}.confirmation-page .helper,.confirmation-page .main{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.confirmation-page .helper{font-size:14px;margin-top:5px}.confirmation-page .referral_text_image_section{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin:20px 0}.confirmation-page .referral_text_section{margin:10px}.confirmation-page .referral_title_text{color:#f08057;font-size:28px;padding-bottom:10px}.confirmation-page .referral_text{font-size:18px}.confirmation-page .referral_text_image_section img{margin:10px;max-width:200px}.confirmation-page .share_wrapper{column-gap:5rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin:10px}.confirmation-page .invitation_title{font-size:22px;padding-bottom:12px;padding-top:12px}.confirmation-page .share_section{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 -10px}.confirmation-page .invitation_section{flex:1 1;padding:0 5px}.confirmation-page .share_buttons{display:grid;flex-wrap:wrap;margin:0 -7px}.confirmation-page .convenient_buttons{margin-top:10px}.confirmation-page .social-media-btns{grid-gap:5px;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.confirmation-page .sharing-btn{background-color:#000;flex:1 1;min-width:130px}.confirmation-page .sharing-btn a{text-decoration:none}.confirmation-page .share-by-link{background:#000;color:#fff;padding:10px}.confirmation-page .share-by-link.label{margin:0;padding:0;text-align:left}.confirmation-page .share-btn-inner{align-items:center;background-color:#000;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-flex;padding:0;text-align:left;width:100%}.confirmation-page .share-input{background-color:#fff;border:none;outline:none;padding:5px;text-align:left;width:300px}.confirmation-page .share-text{display:block;font-size:13px;font-weight:600;padding-top:8px;width:100%}.confirmation-page .pricing-section_wrapper{background:#e3e3e3;border:1px solid #dcdcdc;display:grid;grid-template-columns:1fr 1fr;margin:10px 0;padding:15px}.confirmation-page .pricing-section_label{font-weight:600}.confirmation-page .pricing-section_sublabel{font-size:14px;font-weight:100}.confirmation-page .pricing-section_price{font-weight:600;text-align:right}.confirmation-page .share-by-link-copy-icon{align-items:center;background-color:#32325d;border-radius:4px;color:#fff;cursor:pointer;display:flex;justify-content:center;margin-left:8px;padding:10px;transition:all .15s ease}.confirmation-page .share-by-link-copy-icon:hover{background-color:#505050}.confirmation-page .share-by-link-copy-icon img{width:14px}.confirmation-page .social-media-sharing{background-color:#000;color:#fff;cursor:pointer;padding:10px;text-align:center}.confirmation-page .share-icon{border-radius:4px;display:inline-flex}@media only screen and (max-width:1050px){.confirmation-page .share_wrapper{column-gap:0;display:grid;grid-template-columns:unset;margin:15px}}@media only screen and (max-width:480px){.confirmation-page .social-media-btns{grid-template-columns:unset}.confirmation-page .share-input{width:250px}}body{margin:0;padding:0}.get-tickets-page{width:100%}.event-detail__tier{background-color:#fff;padding:17px 35px 20px}.event-detail__tier-name{color:#000;font-family:Inter-Bold;font-family:Bebas Neue;font-size:.85rem;font-weight:700;letter-spacing:.2em;line-height:1.3;margin-bottom:8px;margin-top:16px;padding-right:20%;text-transform:uppercase}.event-detail__tier-status{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;margin-top:8px;width:100%}.event-detail__tier-status.ticket-button{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;font-weight:700;letter-spacing:.2em;line-height:1.5;margin-bottom:10px;width:200px}.event-tickets-container{align-items:center;display:flex;justify-content:space-between}.event-detail__tier-status.ticket-button.true{background-color:#c1c3c6;border-color:#afb0b1}.event-detail__tier-price{color:#000;font-family:Inter-Bold;font-size:1.5rem;line-height:1;text-align:center}.event-detail__tier-price p{margin:0}.event-detail__tier-price .fees{font-size:14px;margin-top:4px;text-align:left}.event-detail__tier-price .old-price{color:red;font-size:1.3rem;margin-bottom:5px;text-decoration:line-through}.alert-info{align-items:center;background-color:#d9edf7;border:1px solid #bce8f1;border-radius:4px;color:#3a87ad;display:flex;font-size:1em;justify-content:center;margin:0 35px;padding:8px 15px;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.alert-info svg{margin-right:4px}.event-detail__tier-state{color:#30bc9d;font-family:Inter-Bold;font-size:.75rem;font-weight:300;line-height:1;text-align:right;text-transform:uppercase}.event-detail__tier-state .ticket-not-started-message{color:#000;text-align:left;text-transform:none;width:50px}.promo-code-block input{font-size:14px;padding:1px 8px}.book-button{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;display:block;font-size:26px;font-weight:700;height:50px;letter-spacing:.2em;line-height:1.5;margin:25px auto 10px;text-align:center;width:100%}.book-button:hover{background-color:#505050;border-color:#505050}.loader-container{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.get-tickets-paper::-webkit-scrollbar{width:5px}.get-tickets-paper::-webkit-scrollbar-track{background:#f1f1f1}.get-tickets-paper::-webkit-scrollbar-thumb{background:#888}.get-tickets-paper::-webkit-scrollbar-thumb:hover{background:#555}.get-tickets .get-tickets__selectbox{width:100%}.disabled{pointer-events:none;user-select:none}.hidden{display:none}.waiting-list{padding:17px 35px 20px}.waiting-list .field-item{margin-bottom:30px}.waiting-list .waiting-list-button{width:100%!important}.waiting-list .waiting-list-button:hover{background-color:#505050}.waiting-list .success-message{margin-bottom:15px;text-align:center}.waiting-list .success-message p{margin:0}.waiting-list .no-tickets-text{font-weight:700;text-align:center}.waiting-list .added-success-message{font-size:22px;margin-bottom:10px}.countdown p{margin:0}.countdown .title{font-weight:700}.countdown .message{font-weight:700;margin-top:20px}.my-ticket{padding:30px}.my-ticket-table{margin-top:30px}.my-ticket .loading{background-color:rgba(0,0,0,.4);height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100%}.my-ticket .event-info,.my-ticket .loading{align-items:center;display:flex}.my-ticket thead th{font-weight:700}.my-ticket .event-info img{margin-right:10px;width:50px}.my-ticket .order-details-button{background-color:#32325d;border:none;border-radius:4px;color:#fff;cursor:pointer;padding:10px 14px;transition:all .15s ease}.my-ticket .order-details-button:hover{background-color:#505050}.order-details{margin:0 auto;max-width:940px}.order-details .loading{align-items:center;background-color:rgba(0,0,0,.4);display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100%}.order-details .layout-title{font-size:24px;font-weight:400}.order-details .sub-title{font-size:18px;font-weight:400;margin:10px 0}.order-details .order-summary-box{margin-top:30px}.order-details .total-row td,.order-details th{color:#fff;font-weight:700}.order-details .tickets-box{margin-top:30px}.order-details .ticket-add-on-table{background-color:#fcf8e3}.order-details .download-button{background-color:#212529;border:1px solid #fff;border-radius:0;color:#fff;cursor:pointer;display:block;font-family:Bebas Neue;font-size:16px;font-weight:400;line-height:normal;margin-bottom:20px;margin-top:20px;min-height:auto;outline:none;overflow:hidden;padding:12px 0;position:relative;text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:uppercase;width:100%}.order-details .download-button:hover{background-color:#505050}.order-details .personal-link{padding:20px 0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const downloadPDF: (pdfUrl: string) => void;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { setConfigs, CONFIGS } from './setConfigs';
|
|
2
2
|
export { getQueryVariable } from './getQueryVariable';
|
|
3
3
|
export { ErrorFocus } from './formikErrorFocus';
|
|
4
|
+
export { downloadPDF } from './downloadPDF';
|
|
4
5
|
export { createCheckoutDataBodyWithDefaultHolder } from './createCheckoutDataBodyWithDefaultHolder';
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.78",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
"lodash": "^4.17.21",
|
|
78
78
|
"lodash-es": "^4.17.21",
|
|
79
79
|
"material-ui-phone-number": "^3.0.0",
|
|
80
|
+
"moment-timezone": "^0.5.34",
|
|
80
81
|
"nanoid": "^3.1.30",
|
|
81
82
|
"prop-types": "^15.7.2",
|
|
82
83
|
"react-bootstrap": "^2.0.2",
|
package/src/api/index.ts
CHANGED
|
@@ -123,6 +123,15 @@ export const handleSetAccessToken = (token: any) => {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
export function getEvent(id: string | number) {
|
|
127
|
+
const response = publicRequest
|
|
128
|
+
.get(`v1/event/${id}`, { headers: ttfHeaders })
|
|
129
|
+
.catch(error => {
|
|
130
|
+
throw error
|
|
131
|
+
})
|
|
132
|
+
return response
|
|
133
|
+
}
|
|
134
|
+
|
|
126
135
|
export function getTickets(id: string | number, promoCode: string) {
|
|
127
136
|
const response = publicRequest
|
|
128
137
|
.get(`v1/event/${id}/tickets/`, {
|
|
@@ -17,7 +17,7 @@ interface IOtherProps {
|
|
|
17
17
|
export const FormikPhoneNumberField = ({
|
|
18
18
|
label,
|
|
19
19
|
field,
|
|
20
|
-
form: { touched, errors },
|
|
20
|
+
form: { touched, errors, initialValues },
|
|
21
21
|
setFieldValue,
|
|
22
22
|
selectOptions,
|
|
23
23
|
...rest
|
|
@@ -30,6 +30,7 @@ export const FormikPhoneNumberField = ({
|
|
|
30
30
|
return (
|
|
31
31
|
<MuiPhoneNumber
|
|
32
32
|
name='phone'
|
|
33
|
+
value={initialValues.phone}
|
|
33
34
|
onChange={(e: any) => setFieldValue("phone", removePlusSign(e))}
|
|
34
35
|
variant="outlined"
|
|
35
36
|
defaultCountry='us'
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import moment from 'moment-timezone'
|
|
3
|
+
import './style.css'
|
|
4
|
+
|
|
5
|
+
interface CountdownTypes {
|
|
6
|
+
startDate: string;
|
|
7
|
+
timezone?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
callback?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const isTimeExpired = (startDate: string, timezone: string) => {
|
|
14
|
+
return !moment(startDate).isAfter(moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss'))
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function Countdown({
|
|
18
|
+
startDate,
|
|
19
|
+
timezone = moment.tz.guess(),
|
|
20
|
+
title = '',
|
|
21
|
+
message = '',
|
|
22
|
+
callback = () => {}
|
|
23
|
+
}: CountdownTypes) {
|
|
24
|
+
const [duration, setDuration] = useState('')
|
|
25
|
+
const [timeExpired, setTimeExpired] = useState(false)
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setTimeExpired(isTimeExpired(startDate, timezone))
|
|
29
|
+
}, [])
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
let timer: any;
|
|
33
|
+
|
|
34
|
+
if(!timeExpired) {
|
|
35
|
+
timer = setInterval(() => {
|
|
36
|
+
if(isTimeExpired(startDate, timezone)) {
|
|
37
|
+
clearInterval(timer)
|
|
38
|
+
setTimeExpired(true)
|
|
39
|
+
callback()
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const currentDate = moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss')
|
|
43
|
+
const diffTime = moment(startDate).diff(currentDate)
|
|
44
|
+
const duration = moment.duration(diffTime)
|
|
45
|
+
const dateArr: any = {
|
|
46
|
+
year: duration.years(),
|
|
47
|
+
month: duration.months(),
|
|
48
|
+
day: duration.days(),
|
|
49
|
+
hour: duration.hours(),
|
|
50
|
+
minute: duration.minutes(),
|
|
51
|
+
second: duration.seconds(),
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let timeLeft = ''
|
|
55
|
+
|
|
56
|
+
for(let date in dateArr) {
|
|
57
|
+
const unit = dateArr[date] === 1 ? date : date + 's'
|
|
58
|
+
const val = String(dateArr[date]).length === 1 ? '0' + dateArr[date] : dateArr[date]
|
|
59
|
+
if(timeLeft) {
|
|
60
|
+
timeLeft += `, ${val} ${unit}`
|
|
61
|
+
} else if(dateArr[date]) {
|
|
62
|
+
timeLeft += `${val} ${unit}`
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
setDuration(timeLeft)
|
|
67
|
+
}, 1000)
|
|
68
|
+
}
|
|
69
|
+
return () => {
|
|
70
|
+
clearInterval(timer)
|
|
71
|
+
}
|
|
72
|
+
}, [timeExpired])
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<>
|
|
76
|
+
{!timeExpired && duration && (
|
|
77
|
+
<div className='countdown'>
|
|
78
|
+
<div>
|
|
79
|
+
<p className='title'>{title}</p>
|
|
80
|
+
<p>{duration}</p>
|
|
81
|
+
</div>
|
|
82
|
+
<p className='message'>{message}</p>
|
|
83
|
+
</div>
|
|
84
|
+
)}
|
|
85
|
+
</>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export default Countdown
|
|
@@ -124,6 +124,8 @@ export const LoginModal: FC<Props> = ({
|
|
|
124
124
|
JSON.stringify(profileDataObj)
|
|
125
125
|
)
|
|
126
126
|
window.localStorage.setItem('access_token', accessToken)
|
|
127
|
+
const event = new window.CustomEvent('tf-login')
|
|
128
|
+
window.document.dispatchEvent(event)
|
|
127
129
|
}
|
|
128
130
|
onLogin()
|
|
129
131
|
} catch (e) {
|
|
@@ -6,13 +6,14 @@ import TableContainer from '@mui/material/TableContainer'
|
|
|
6
6
|
import TableHead from '@mui/material/TableHead'
|
|
7
7
|
import TableRow from '@mui/material/TableRow'
|
|
8
8
|
import Paper from '@mui/material/Paper'
|
|
9
|
+
import { downloadPDF } from '../../utils'
|
|
9
10
|
|
|
10
|
-
interface
|
|
11
|
-
|
|
11
|
+
interface IAddOnTypes {
|
|
12
|
+
name: string;
|
|
13
|
+
status: string;
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
add_ons: any[];
|
|
15
|
+
interface ITicketTypes {
|
|
16
|
+
add_ons?: IAddOnTypes[];
|
|
16
17
|
hash: string;
|
|
17
18
|
ticket_type: string;
|
|
18
19
|
holder_name: string;
|
|
@@ -20,67 +21,72 @@ interface TicketTypes {
|
|
|
20
21
|
pdf_link: string;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
interface
|
|
24
|
-
|
|
25
|
-
status: string;
|
|
24
|
+
interface TicketsTableTypes {
|
|
25
|
+
tickets: ITicketTypes[];
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const TicketsTable = ({ tickets = [] }: TicketsTableTypes) =>
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
<
|
|
28
|
+
const TicketsTable = ({ tickets = [] }: TicketsTableTypes) => (
|
|
29
|
+
<div className="tickets-box">
|
|
30
|
+
<h4 className="sub-title">Your Tickets</h4>
|
|
31
|
+
<TableContainer component={Paper}>
|
|
32
|
+
<Table aria-label="collapsible table">
|
|
33
|
+
<TableHead>
|
|
34
|
+
<TableRow>
|
|
35
|
+
<TableCell>Ticket ID</TableCell>
|
|
36
|
+
<TableCell>Ticket Type</TableCell>
|
|
37
|
+
<TableCell>Ticket Holder Name</TableCell>
|
|
38
|
+
<TableCell>Status</TableCell>
|
|
39
|
+
<TableCell>Download</TableCell>
|
|
40
|
+
</TableRow>
|
|
41
|
+
</TableHead>
|
|
42
|
+
<TableBody>
|
|
43
|
+
{tickets.map((ticket: ITicketTypes, index: number) => (
|
|
44
|
+
<Fragment key={index}>
|
|
45
|
+
<TableRow>
|
|
46
|
+
<TableCell>{ticket.hash}</TableCell>
|
|
47
|
+
<TableCell>{ticket.ticket_type}</TableCell>
|
|
48
|
+
<TableCell>{ticket.holder_name}</TableCell>
|
|
49
|
+
<TableCell>{ticket.status}</TableCell>
|
|
50
|
+
<TableCell>
|
|
51
|
+
<span
|
|
52
|
+
aria-hidden={true}
|
|
53
|
+
className="download-button"
|
|
54
|
+
onClick={() => downloadPDF(ticket.pdf_link)}
|
|
55
|
+
>
|
|
56
|
+
Download
|
|
57
|
+
</span>
|
|
58
|
+
</TableCell>
|
|
59
|
+
</TableRow>
|
|
60
|
+
{!!ticket.add_ons?.length && (
|
|
46
61
|
<TableRow>
|
|
47
|
-
<TableCell
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<Table className='ticket-add-on-table'>
|
|
59
|
-
<TableHead>
|
|
60
|
-
<TableRow>
|
|
61
|
-
<TableCell>Add-On</TableCell>
|
|
62
|
-
<TableCell>Status</TableCell>
|
|
63
|
-
</TableRow>
|
|
64
|
-
</TableHead>
|
|
65
|
-
<TableBody>
|
|
66
|
-
{ticket.add_ons.map((add_on: AddOnTypes, index: number) => (
|
|
62
|
+
<TableCell colSpan={5}>
|
|
63
|
+
<Table className="ticket-add-on-table">
|
|
64
|
+
<TableHead>
|
|
65
|
+
<TableRow>
|
|
66
|
+
<TableCell>Add-On</TableCell>
|
|
67
|
+
<TableCell>Status</TableCell>
|
|
68
|
+
</TableRow>
|
|
69
|
+
</TableHead>
|
|
70
|
+
<TableBody>
|
|
71
|
+
{ticket.add_ons.map(
|
|
72
|
+
(add_on: IAddOnTypes, index: number) => (
|
|
67
73
|
<TableRow key={index}>
|
|
68
74
|
<TableCell>{add_on.name}</TableCell>
|
|
69
75
|
<TableCell>{add_on.status}</TableCell>
|
|
70
76
|
</TableRow>
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
</
|
|
74
|
-
</
|
|
75
|
-
</
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</
|
|
81
|
-
</
|
|
82
|
-
</
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
)
|
|
78
|
+
)}
|
|
79
|
+
</TableBody>
|
|
80
|
+
</Table>
|
|
81
|
+
</TableCell>
|
|
82
|
+
</TableRow>
|
|
83
|
+
)}
|
|
84
|
+
</Fragment>
|
|
85
|
+
))}
|
|
86
|
+
</TableBody>
|
|
87
|
+
</Table>
|
|
88
|
+
</TableContainer>
|
|
89
|
+
</div>
|
|
90
|
+
)
|
|
85
91
|
|
|
86
92
|
export default TicketsTable
|
|
@@ -34,13 +34,14 @@ export const PromoCodeSection = ({
|
|
|
34
34
|
src={getImage('done.svg')}
|
|
35
35
|
preProcessor={(code) => code.replace(/fill=".*?"/g, 'fill="currentColor"')}
|
|
36
36
|
/>
|
|
37
|
-
<p>PROMO CODE APPLIED SUCCESSFULLY</p>
|
|
37
|
+
<p className="promo-code-success">PROMO CODE APPLIED SUCCESSFULLY</p>
|
|
38
38
|
</div>
|
|
39
39
|
) : null}
|
|
40
40
|
{showPromoInput && (
|
|
41
41
|
<div className="promo-code-block">
|
|
42
|
+
<label>PROMO CODE</label>
|
|
42
43
|
<input
|
|
43
|
-
placeholder="
|
|
44
|
+
placeholder=""
|
|
44
45
|
onChange={e => {
|
|
45
46
|
setPromoCode(e.target.value)
|
|
46
47
|
}}
|
|
@@ -66,12 +66,16 @@ export const TicketsSection = ({
|
|
|
66
66
|
className="event-detail__tier-state"
|
|
67
67
|
style={{ minWidth: 55 }}
|
|
68
68
|
>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
{ticket.salesStarted ? (
|
|
70
|
+
<TicketRow
|
|
71
|
+
ticketTier={ticket}
|
|
72
|
+
prevTicketTier={arr[i - 1]}
|
|
73
|
+
selectedTickets={selectedTickets}
|
|
74
|
+
handleTicketSelect={ticketSelect}
|
|
75
|
+
/>
|
|
76
|
+
) : (
|
|
77
|
+
<p className='ticket-not-started-message'>Sales not started</p>
|
|
78
|
+
)}
|
|
75
79
|
</div>
|
|
76
80
|
</div>
|
|
77
81
|
</div>
|
|
@@ -4,6 +4,7 @@ import './style.css'
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
getTickets,
|
|
7
|
+
getEvent,
|
|
7
8
|
addToCart,
|
|
8
9
|
setCustomHeader,
|
|
9
10
|
postOnCheckout,
|
|
@@ -18,6 +19,8 @@ import jwt_decode from 'jwt-decode'
|
|
|
18
19
|
import { TicketsSection } from './TicketsSection'
|
|
19
20
|
import WaitingList from '../waitingList'
|
|
20
21
|
import { PromoCodeSection } from './PromoCodeSection'
|
|
22
|
+
import { LoginModal } from '../loginModal'
|
|
23
|
+
import Countdown from '../countdown'
|
|
21
24
|
import { createCheckoutDataBodyWithDefaultHolder } from '../../utils'
|
|
22
25
|
|
|
23
26
|
function Loader() {
|
|
@@ -44,6 +47,7 @@ export interface IGetTickets {
|
|
|
44
47
|
onAddToCartError: (e: AxiosError) => void;
|
|
45
48
|
onGetTicketsSuccess: (response: any) => void;
|
|
46
49
|
onGetTicketsError: (e: AxiosError) => void;
|
|
50
|
+
onLoginSuccess: () => void;
|
|
47
51
|
|
|
48
52
|
theme?: 'light' | 'dark';
|
|
49
53
|
queryPromoCode?: string;
|
|
@@ -60,6 +64,7 @@ export interface ISelectedTickets {
|
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
export const TicketsContainer = ({
|
|
67
|
+
onLoginSuccess,
|
|
63
68
|
getTicketsLabel,
|
|
64
69
|
eventId,
|
|
65
70
|
onAddToCartSuccess,
|
|
@@ -74,7 +79,13 @@ export const TicketsContainer = ({
|
|
|
74
79
|
const [selectedTickets, setSelectedTickets] = useState(
|
|
75
80
|
{} as ISelectedTickets
|
|
76
81
|
)
|
|
82
|
+
const isWindowDefined = typeof window !== 'undefined'
|
|
83
|
+
const [isLogged, setIsLogged] = useState(
|
|
84
|
+
isWindowDefined ? !!window.localStorage.getItem('access_token') : false
|
|
85
|
+
)
|
|
86
|
+
const [showLoginModal, setShowLoginModal] = React.useState(false)
|
|
77
87
|
const [tickets, setTickets] = useState([] as ITicket[])
|
|
88
|
+
const [event, setEvent] = useState<any>(null)
|
|
78
89
|
const [showWaitingList, setShowWaitingList] = useState(false)
|
|
79
90
|
const [isLoading, setIsLoading] = useState(false)
|
|
80
91
|
const [handleBookIsLoading, setHandleBookIsLoading] = useState(false)
|
|
@@ -97,29 +108,59 @@ export const TicketsContainer = ({
|
|
|
97
108
|
}, [])
|
|
98
109
|
|
|
99
110
|
useEffect(() => {
|
|
100
|
-
async function getTicketsApi() {
|
|
101
|
-
try {
|
|
102
|
-
setIsLoading(true)
|
|
103
|
-
const response = await getTickets(eventId, promoCodeUpdated)
|
|
104
|
-
if (response.data.success) {
|
|
105
|
-
setCustomHeader(response)
|
|
106
|
-
const attributes = _get(response, 'data.data.attributes')
|
|
107
|
-
setPromoCodeIsApplied(attributes.ValidPromoCode)
|
|
108
|
-
setTickets(_get(attributes, 'tickets'))
|
|
109
|
-
setShowWaitingList(attributes.showWaitingList)
|
|
110
|
-
onGetTicketsSuccess(response.data)
|
|
111
|
-
}
|
|
112
|
-
} catch (e) {
|
|
113
|
-
if (axios.isAxiosError(e)) {
|
|
114
|
-
onGetTicketsError(e)
|
|
115
|
-
}
|
|
116
|
-
} finally {
|
|
117
|
-
setIsLoading(false)
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
111
|
getTicketsApi()
|
|
121
112
|
}, [eventId, promoCodeUpdated])
|
|
122
113
|
|
|
114
|
+
const handleLogout = () => {
|
|
115
|
+
if (isWindowDefined) {
|
|
116
|
+
window.localStorage.removeItem('access_token')
|
|
117
|
+
window.localStorage.removeItem('user_data')
|
|
118
|
+
setIsLogged(false)
|
|
119
|
+
const event = new window.CustomEvent('tf-logout')
|
|
120
|
+
window.document.dispatchEvent(event)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const handleExternalLogin = () => {
|
|
125
|
+
setIsLogged(true)
|
|
126
|
+
}
|
|
127
|
+
const handleOnClose = () => {
|
|
128
|
+
setShowLoginModal(false)
|
|
129
|
+
}
|
|
130
|
+
const handleOnLogin = () => {
|
|
131
|
+
setShowLoginModal(false)
|
|
132
|
+
setIsLogged(true)
|
|
133
|
+
if (onLoginSuccess) {
|
|
134
|
+
onLoginSuccess()
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
async function getTicketsApi() {
|
|
139
|
+
try {
|
|
140
|
+
setIsLoading(true)
|
|
141
|
+
const response = await getTickets(eventId, promoCodeUpdated)
|
|
142
|
+
const eventResponse = await getEvent(eventId)
|
|
143
|
+
if (response.data.success) {
|
|
144
|
+
setCustomHeader(response)
|
|
145
|
+
const attributes = _get(response, 'data.data.attributes')
|
|
146
|
+
setPromoCodeIsApplied(attributes.ValidPromoCode)
|
|
147
|
+
setTickets(_get(attributes, 'tickets'))
|
|
148
|
+
setShowWaitingList(attributes.showWaitingList)
|
|
149
|
+
onGetTicketsSuccess(response.data)
|
|
150
|
+
}
|
|
151
|
+
if (eventResponse.data.success) {
|
|
152
|
+
const event = _get(eventResponse, 'data.data.attributes')
|
|
153
|
+
setEvent(event)
|
|
154
|
+
}
|
|
155
|
+
} catch (e) {
|
|
156
|
+
if (axios.isAxiosError(e)) {
|
|
157
|
+
onGetTicketsError(e)
|
|
158
|
+
}
|
|
159
|
+
} finally {
|
|
160
|
+
setIsLoading(false)
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
123
164
|
const handleTicketSelect = (key: string, value: number | string) => {
|
|
124
165
|
setSelectedTickets(prevState => {
|
|
125
166
|
if (Object.keys(prevState)[0] !== key && !value) {
|
|
@@ -131,6 +172,12 @@ export const TicketsContainer = ({
|
|
|
131
172
|
})
|
|
132
173
|
}
|
|
133
174
|
|
|
175
|
+
const handleOrdersClick = () => {
|
|
176
|
+
if (isWindowDefined) {
|
|
177
|
+
window.location.href = '/orders'
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
134
181
|
const handleBook = async () => {
|
|
135
182
|
setHandleBookIsLoading(true)
|
|
136
183
|
const ticket =
|
|
@@ -218,11 +265,36 @@ export const TicketsContainer = ({
|
|
|
218
265
|
}
|
|
219
266
|
}
|
|
220
267
|
|
|
268
|
+
const updateTickets = () => {
|
|
269
|
+
getTicketsApi()
|
|
270
|
+
}
|
|
271
|
+
|
|
221
272
|
const isAllTicketsSoldOut = !_some(
|
|
222
273
|
tickets,
|
|
223
274
|
item => !(item.sold_out || item.soldOut)
|
|
224
275
|
)
|
|
225
276
|
|
|
277
|
+
useEffect(() => {
|
|
278
|
+
isWindowDefined &&
|
|
279
|
+
window.document.addEventListener('custom-logout', handleLogout)
|
|
280
|
+
return () => {
|
|
281
|
+
isWindowDefined &&
|
|
282
|
+
window.document.removeEventListener('custom-logout', handleLogout)
|
|
283
|
+
}
|
|
284
|
+
}, [])
|
|
285
|
+
|
|
286
|
+
useEffect(() => {
|
|
287
|
+
isWindowDefined &&
|
|
288
|
+
window.document.addEventListener('custom-login', handleExternalLogin)
|
|
289
|
+
return () => {
|
|
290
|
+
isWindowDefined &&
|
|
291
|
+
window.document.removeEventListener(
|
|
292
|
+
'custom-login',
|
|
293
|
+
handleExternalLogin
|
|
294
|
+
)
|
|
295
|
+
}
|
|
296
|
+
}, [])
|
|
297
|
+
|
|
226
298
|
return (
|
|
227
299
|
<div className={`get-tickets-page ${theme}`} style={contentStyle}>
|
|
228
300
|
{isLoading ? (
|
|
@@ -235,12 +307,19 @@ export const TicketsContainer = ({
|
|
|
235
307
|
handleTicketSelect={handleTicketSelect}
|
|
236
308
|
promoCodeIsApplied={promoCodeIsApplied}
|
|
237
309
|
/>
|
|
238
|
-
{
|
|
239
|
-
<
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
310
|
+
{event?.salesEnded ? (
|
|
311
|
+
<p>Sales for this event are closed.</p>
|
|
312
|
+
) : event?.salesStart ? (
|
|
313
|
+
<Countdown
|
|
314
|
+
startDate={event.salesStart}
|
|
315
|
+
timezone={event.timezone}
|
|
316
|
+
title="Sales start in:"
|
|
317
|
+
message="No tickets are currently available for this event."
|
|
318
|
+
callback={updateTickets}
|
|
243
319
|
/>
|
|
320
|
+
) : null}
|
|
321
|
+
{showWaitingList && (
|
|
322
|
+
<WaitingList tickets={tickets} eventId={eventId} />
|
|
244
323
|
)}
|
|
245
324
|
<PromoCodeSection
|
|
246
325
|
promoCode={promoCode}
|
|
@@ -273,8 +352,35 @@ export const TicketsContainer = ({
|
|
|
273
352
|
{getTicketsLabel || 'GET TICKETS'}
|
|
274
353
|
</Button>
|
|
275
354
|
)}
|
|
355
|
+
{isLogged ? (
|
|
356
|
+
<div className="session-wrapper">
|
|
357
|
+
<span className="session-container">
|
|
358
|
+
<Button
|
|
359
|
+
variant="outline-light"
|
|
360
|
+
className="session-buttons"
|
|
361
|
+
onClick={handleOrdersClick}
|
|
362
|
+
>
|
|
363
|
+
My Orders
|
|
364
|
+
</Button>
|
|
365
|
+
</span>
|
|
366
|
+
<span className="session-container">
|
|
367
|
+
<Button
|
|
368
|
+
variant="outline-light"
|
|
369
|
+
className="session-buttons"
|
|
370
|
+
onClick={handleLogout}
|
|
371
|
+
>
|
|
372
|
+
Log out
|
|
373
|
+
</Button>
|
|
374
|
+
</span>
|
|
375
|
+
</div>
|
|
376
|
+
) : (
|
|
377
|
+
''
|
|
378
|
+
)}
|
|
276
379
|
</div>
|
|
277
380
|
)}
|
|
381
|
+
{showLoginModal ? (
|
|
382
|
+
<LoginModal onClose={handleOnClose} onLogin={handleOnLogin} />
|
|
383
|
+
) : null}
|
|
278
384
|
</div>
|
|
279
385
|
)
|
|
280
386
|
}
|
|
@@ -108,6 +108,13 @@ body {
|
|
|
108
108
|
text-transform: uppercase;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
.event-detail__tier-state .ticket-not-started-message {
|
|
112
|
+
color: #000000;
|
|
113
|
+
text-transform: initial;
|
|
114
|
+
width: 50px;
|
|
115
|
+
text-align: left;
|
|
116
|
+
}
|
|
117
|
+
|
|
111
118
|
.promo-code-block input {
|
|
112
119
|
font-size: 14px;
|
|
113
120
|
padding: 1px 8px;
|