tf-checkout-react 1.0.96 → 1.0.98
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 +3 -0
- package/dist/components/common/Loader.d.ts +2 -0
- package/dist/components/common/RadioField.d.ts +11 -0
- package/dist/components/common/index.d.ts +5 -0
- package/dist/components/confirmModal/index.d.ts +9 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +9 -2
- package/dist/components/ticketResale/index.d.ts +8 -0
- package/dist/components/ticketResaleModal/index.d.ts +18 -0
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +2 -1
- package/dist/images/email.svg +1 -0
- package/dist/images/user.svg +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/tf-checkout-react.cjs.development.js +599 -137
- 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 +607 -146
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/package.json +3 -2
- package/src/.DS_Store +0 -0
- package/src/api/index.ts +21 -8
- package/src/assets/images/email.svg +1 -0
- package/src/assets/images/user.svg +1 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/billing-info-container/index.tsx +1 -4
- package/src/components/common/Loader.tsx +10 -0
- package/src/components/common/RadioField.tsx +35 -0
- package/src/components/common/index.tsx +5 -0
- package/src/components/confirmModal/index.tsx +51 -0
- package/src/components/confirmModal/style.css +21 -0
- package/src/components/index.ts +1 -0
- package/src/components/orderDetailsContainer/index.tsx +99 -4
- package/src/components/orderDetailsContainer/style.css +5 -4
- package/src/components/orderDetailsContainer/ticketsTable.tsx +36 -4
- package/src/components/paymentContainer/index.tsx +1 -7
- package/src/components/stripePayment/index.tsx +1 -1
- package/src/components/ticketResale/index.tsx +56 -0
- package/src/components/ticketResaleModal/index.tsx +210 -0
- package/src/components/ticketResaleModal/style.css +28 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +4 -1
- package/src/components/ticketsContainer/index.tsx +8 -12
- package/src/components/waitingList/index.tsx +1 -1
- package/src/index.ts +1 -0
|
@@ -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}.forgot-password{text-align:center}.forgot-password span{cursor:pointer}.forgot-password span:hover{text-decoration:underline}.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{border:none;font-size:18px;margin-top:5px;outline:none;width:100%}.timer,.zip_element input{background-color:#000;color:#fff}.timer{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=);background-position:15px;background-repeat:no-repeat;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;margin:0 0 6px;max-width:300px;overflow:hidden;padding:15px 15px 15px 50px;pointer-events:auto;position:absolute;right:15px;width:300px}.timer .countdown{font-weight:700;margin-top:10px}.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}.event-closed-message{font-family:Bebas Neue;letter-spacing:.5px}.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}
|
|
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}.forgot-password{text-align:center}.forgot-password span{cursor:pointer}.forgot-password span:hover{text-decoration:underline}.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{border:none;font-size:18px;margin-top:5px;outline:none;width:100%}.timer,.zip_element input{background-color:#000;color:#fff}.timer{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=);background-position:15px;background-repeat:no-repeat;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;margin:0 0 6px;max-width:300px;overflow:hidden;padding:15px 15px 15px 50px;pointer-events:auto;position:absolute;right:15px;width:300px}.timer .countdown{font-weight:700;margin-top:10px}.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}.event-closed-message{font-family:Bebas Neue;letter-spacing:.5px}.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%;z-index:1400}.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 .action-button{background-color:#212529;border:1px solid #fff;border-radius:0;color:#fff;cursor:pointer;display:block;font-family:Bebas Neue;font-size:14px;font-weight:400;line-height:normal;margin-bottom:20px;margin-top:20px;min-height:auto;outline:none;overflow:hidden;padding:12px;position:relative;text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:uppercase;width:max-content}.order-details .download-button:hover{background-color:#505050}.order-details .personal-link{padding:20px 0}.resale-modal .field-box{display:flex;margin-bottom:10px}.resale-modal .field-box .icon{align-items:center;display:flex;height:56px;justify-content:center;min-width:44px}.resale-modal .field-box .empty-box{min-width:44px}.resale-modal .resale-action-button button{background-color:#212529;color:#fff;cursor:pointer;width:100%}.resale-modal .resale-action-button button[disabled]{opacity:.7}.resale-modal .resale-action-button button:hover{background-color:#505050;border-color:#505050;width:100%}.confirm-modal .footer{border-top:1px solid #c0bfbf;display:flex;gap:10px;justify-content:flex-end}.confirm-modal .footer button,.confirm-modal .footer button:hover{font-size:12px;min-height:unset;padding:12px 8px;text-transform:unset;width:max-content}.confirm-modal .footer button:hover{background:#505050}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.98",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"react-bootstrap": "^2.0.2",
|
|
84
84
|
"react-countdown": "^2.3.2",
|
|
85
85
|
"react-inlinesvg": "^2.3.0",
|
|
86
|
-
"react-share": "^4.4.0"
|
|
86
|
+
"react-share": "^4.4.0",
|
|
87
|
+
"yup": "^0.32.11"
|
|
87
88
|
}
|
|
88
89
|
}
|
package/src/.DS_Store
ADDED
|
Binary file
|
package/src/api/index.ts
CHANGED
|
@@ -176,16 +176,16 @@ export const postOnCheckout = (data: any, accessToken: string) => {
|
|
|
176
176
|
|
|
177
177
|
export const authorize = (data: FormData) =>
|
|
178
178
|
publicRequest.post(
|
|
179
|
-
|
|
179
|
+
`v1/oauth/authorize-rn?client_id=${CONFIGS.CLIENT_ID ||
|
|
180
180
|
'e9d8f8922797b4621e562255afe90dbf'}`,
|
|
181
181
|
data
|
|
182
182
|
)
|
|
183
183
|
|
|
184
184
|
export const register = (data: FormData) =>
|
|
185
|
-
publicRequest.post('
|
|
185
|
+
publicRequest.post('v1/oauth/register-rn', data)
|
|
186
186
|
|
|
187
187
|
export const getAccessToken = (data: FormData) =>
|
|
188
|
-
publicRequest.post('
|
|
188
|
+
publicRequest.post('v1/oauth/access_token', data)
|
|
189
189
|
|
|
190
190
|
export const getPaymentData = (hash: string) => {
|
|
191
191
|
const response = publicRequest
|
|
@@ -240,26 +240,39 @@ export const getProfileData = (accessToken: any) =>
|
|
|
240
240
|
export const getCountries = () => publicRequest.get('/countries/')
|
|
241
241
|
|
|
242
242
|
export const getConfirmationData = (orderHash: string) =>
|
|
243
|
-
publicRequest.get(
|
|
243
|
+
publicRequest.get(`v1/order/${orderHash}/payment/complete`)
|
|
244
244
|
|
|
245
245
|
export const getStates = (countryId: string) =>
|
|
246
246
|
publicRequest.get(`/countries/${countryId}/states/`)
|
|
247
247
|
|
|
248
248
|
export const getOrders = (page: number, limit: number, eventSlug: string) =>
|
|
249
249
|
publicRequest.get(
|
|
250
|
-
|
|
250
|
+
`v1/account/orders/?page=${page}&limit=${limit}&filter[event]=${eventSlug}&filter[brand]=${CONFIGS.BRAND_SLUG}`
|
|
251
251
|
)
|
|
252
252
|
|
|
253
253
|
export const getOrderDetails = (orderId: string) =>
|
|
254
|
-
publicRequest.get(
|
|
254
|
+
publicRequest.get(`v1/account/order/${orderId}`)
|
|
255
255
|
|
|
256
256
|
export const addToWaitingList = (id: number, data: any) =>
|
|
257
|
-
publicRequest.post(
|
|
257
|
+
publicRequest.post(`v1/event/${id}/add_to_waiting_list`, data)
|
|
258
258
|
|
|
259
259
|
export const getConditions = (eventId: string) =>
|
|
260
260
|
publicRequest.get(`v1/event/${eventId}/conditions`)
|
|
261
261
|
|
|
262
|
+
// resale
|
|
263
|
+
export const resaleTicket = (data: any, hash: string) => {
|
|
264
|
+
return publicRequest.post(`v1/ticket/${hash}/sell`, data)
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export const removeFromResale = (hash: string) => {
|
|
268
|
+
return publicRequest.delete(`v1/ticket/${hash}/sell`)
|
|
269
|
+
}
|
|
270
|
+
|
|
262
271
|
export const postReferralVisits = (eventId: string, referralId: string) =>
|
|
263
|
-
publicRequest.post(
|
|
272
|
+
publicRequest.post(`v1/event/${eventId}/referrer/`, {
|
|
264
273
|
referrer: `${referralId}`,
|
|
265
274
|
})
|
|
275
|
+
|
|
276
|
+
export const checkTicketStatus = (hash: string) => {
|
|
277
|
+
return publicRequest.post(`v1/ticket/${hash}/status/`)
|
|
278
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="envelope" class="svg-inline--fa fa-envelope fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="user" class="svg-inline--fa fa-user fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"></path></svg>
|
|
Binary file
|
|
@@ -40,15 +40,12 @@ import {
|
|
|
40
40
|
setLoggedUserData,
|
|
41
41
|
} from './utils'
|
|
42
42
|
import { createCheckoutDataBodyWithDefaultHolder } from '../../utils'
|
|
43
|
-
import { CustomField } from '../common/CustomField'
|
|
44
43
|
import axios from 'axios'
|
|
45
|
-
import { CheckboxField } from '../common/
|
|
44
|
+
import { CustomField, CheckboxField, SelectField, FormikPhoneNumberField } from '../common/index'
|
|
46
45
|
import { Alert, CircularProgress, ThemeOptions } from '@mui/material'
|
|
47
46
|
import { nanoid } from 'nanoid'
|
|
48
47
|
import { getQueryVariable } from '../../utils/getQueryVariable'
|
|
49
|
-
import { SelectField } from '../common/SelectField'
|
|
50
48
|
import { ErrorFocus } from '../../utils/formikErrorFocus'
|
|
51
|
-
import { FormikPhoneNumberField } from '../common/FormikPhoneNumberField'
|
|
52
49
|
import { ThemeProvider, createTheme } from '@mui/material/styles'
|
|
53
50
|
import { CSSProperties } from '@mui/styles'
|
|
54
51
|
import Backdrop from '@mui/material/Backdrop'
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import FormGroup from '@mui/material/FormGroup'
|
|
3
|
+
import FormControlLabel from '@mui/material/FormControlLabel'
|
|
4
|
+
import Radio from '@mui/material/Radio';
|
|
5
|
+
import { FieldInputProps } from 'formik'
|
|
6
|
+
import { useTheme } from '@mui/styles'
|
|
7
|
+
|
|
8
|
+
export interface IRadioField {
|
|
9
|
+
label: string | number | JSX.Element;
|
|
10
|
+
field?: FieldInputProps<any>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface IOtherProps {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const RadioField = ({
|
|
18
|
+
label,
|
|
19
|
+
field,
|
|
20
|
+
theme,
|
|
21
|
+
...rest
|
|
22
|
+
}: IRadioField & IOtherProps) => {
|
|
23
|
+
const customTheme: any = useTheme()
|
|
24
|
+
return (
|
|
25
|
+
<FormGroup>
|
|
26
|
+
<FormControlLabel
|
|
27
|
+
control={<Radio {...field} {...rest} />}
|
|
28
|
+
label={label}
|
|
29
|
+
componentsProps={{
|
|
30
|
+
typography: customTheme?.checkbox
|
|
31
|
+
}}
|
|
32
|
+
/>
|
|
33
|
+
</FormGroup>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { FC } from 'react'
|
|
2
|
+
import Modal from '@mui/material/Modal'
|
|
3
|
+
import Box from '@mui/material/Box'
|
|
4
|
+
import Button from '@mui/material/Button';
|
|
5
|
+
import './style.css'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
message: string;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
onConfirm: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const style: React.CSSProperties = {
|
|
14
|
+
position: 'absolute',
|
|
15
|
+
top: '50%',
|
|
16
|
+
left: '50%',
|
|
17
|
+
transform: 'translate(-50%, -50%)',
|
|
18
|
+
minWidth: 480,
|
|
19
|
+
backgroundColor: '#e3e3e3',
|
|
20
|
+
border: '1px solid white',
|
|
21
|
+
outline: 'none',
|
|
22
|
+
padding: '14px',
|
|
23
|
+
maxHeight: '85vh',
|
|
24
|
+
overflow: 'auto'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const ConfirmModal: FC<Props> = ({
|
|
28
|
+
message = '',
|
|
29
|
+
onClose = () => {},
|
|
30
|
+
onConfirm = () => {},
|
|
31
|
+
}) => {
|
|
32
|
+
return (
|
|
33
|
+
<Modal
|
|
34
|
+
open={true}
|
|
35
|
+
onClose={onClose}
|
|
36
|
+
aria-labelledby="modal-modal-title"
|
|
37
|
+
aria-describedby="modal-modal-description"
|
|
38
|
+
className='confirm-modal'
|
|
39
|
+
>
|
|
40
|
+
<Box style={style}>
|
|
41
|
+
<p>{message}</p>
|
|
42
|
+
<div className='footer'>
|
|
43
|
+
<Button onClick={onClose}>Cancel</Button>
|
|
44
|
+
<Button onClick={onConfirm}>OK</Button>
|
|
45
|
+
</div>
|
|
46
|
+
</Box>
|
|
47
|
+
</Modal>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default ConfirmModal
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.confirm-modal .footer {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 10px;
|
|
4
|
+
justify-content: flex-end;
|
|
5
|
+
border-top: 1px solid rgb(192, 191, 191);
|
|
6
|
+
}
|
|
7
|
+
.confirm-modal .footer button {
|
|
8
|
+
width: max-content;
|
|
9
|
+
padding: 12px 8px;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
min-height: unset;
|
|
12
|
+
text-transform: unset;
|
|
13
|
+
}
|
|
14
|
+
.confirm-modal .footer button:hover {
|
|
15
|
+
width: max-content;
|
|
16
|
+
padding: 12px 8px;
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
background: #505050;
|
|
19
|
+
min-height: unset;
|
|
20
|
+
text-transform: unset;
|
|
21
|
+
}
|
package/src/components/index.ts
CHANGED
|
@@ -4,3 +4,4 @@ export { PaymentContainer } from './paymentContainer'
|
|
|
4
4
|
export { TicketsContainer } from './ticketsContainer'
|
|
5
5
|
export { MyTicketsContainer } from './myTicketsContainer'
|
|
6
6
|
export { OrderDetailsContainer } from './orderDetailsContainer'
|
|
7
|
+
export { TicketResaleContainer } from './ticketResale'
|
|
@@ -12,7 +12,10 @@ import CircularProgress from '@mui/material/CircularProgress'
|
|
|
12
12
|
import _get from 'lodash/get'
|
|
13
13
|
import _has from 'lodash/has'
|
|
14
14
|
import { getOrderDetails } from '../../api'
|
|
15
|
-
import TicketsTable from './ticketsTable'
|
|
15
|
+
import TicketsTable, { ITicketTypes } from './ticketsTable'
|
|
16
|
+
import { TicketResaleModal, InitialValuesTypes } from '../ticketResaleModal'
|
|
17
|
+
import ConfirmModal from '../confirmModal'
|
|
18
|
+
import { resaleTicket, removeFromResale } from '../../api'
|
|
16
19
|
|
|
17
20
|
interface TicketTypes {
|
|
18
21
|
currency: string;
|
|
@@ -40,6 +43,9 @@ export const OrderDetailsContainer = ({
|
|
|
40
43
|
}: OrderDetailsTypes) => {
|
|
41
44
|
const [data, setData] = useState<any>({})
|
|
42
45
|
const [loading, setLoading] = useState(true)
|
|
46
|
+
const [showResaleModal, setShowResaleModal] = useState(false)
|
|
47
|
+
const [showRemoveResaleModal, setShowRemoveResaleModal] = useState(false)
|
|
48
|
+
const [activeTicket, setActiveTicket] = useState<any>(null)
|
|
43
49
|
|
|
44
50
|
useEffect(() => {
|
|
45
51
|
(async () => {
|
|
@@ -65,6 +71,77 @@ export const OrderDetailsContainer = ({
|
|
|
65
71
|
})()
|
|
66
72
|
}, [])
|
|
67
73
|
|
|
74
|
+
const handleSellTicket = (ticket: ITicketTypes) => {
|
|
75
|
+
setActiveTicket(ticket)
|
|
76
|
+
setShowResaleModal(true)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const handleOnClose = () => {
|
|
80
|
+
setShowResaleModal(false)
|
|
81
|
+
setActiveTicket(null)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const handleOnSubmit = async (values: InitialValuesTypes) => {
|
|
85
|
+
try {
|
|
86
|
+
setLoading(true)
|
|
87
|
+
const { to, first_name, last_name, email, confirm_email, confirm } = values
|
|
88
|
+
const formData = new FormData();
|
|
89
|
+
formData.append('to', to)
|
|
90
|
+
formData.append('first_name', first_name)
|
|
91
|
+
formData.append('last_name', last_name)
|
|
92
|
+
formData.append('email', email)
|
|
93
|
+
formData.append('confirm_email', confirm_email)
|
|
94
|
+
formData.append('confirm', String(confirm))
|
|
95
|
+
|
|
96
|
+
await resaleTicket(formData, activeTicket.hash)
|
|
97
|
+
const updatedData = { ...data }
|
|
98
|
+
updatedData?.tickets?.forEach((ticket: ITicketTypes) => {
|
|
99
|
+
if(ticket.hash === activeTicket.hash) {
|
|
100
|
+
ticket.is_sellable = false
|
|
101
|
+
ticket.is_on_sale = true
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
setData(updatedData)
|
|
106
|
+
} catch (error) {
|
|
107
|
+
// ...
|
|
108
|
+
} finally {
|
|
109
|
+
setShowResaleModal(false)
|
|
110
|
+
setLoading(false)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const handleRemoveFromResale = (ticket: ITicketTypes) => {
|
|
115
|
+
setShowRemoveResaleModal(true)
|
|
116
|
+
setActiveTicket(ticket)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const onCloseRemoveResale = () => {
|
|
120
|
+
setShowRemoveResaleModal(false)
|
|
121
|
+
setActiveTicket(null)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const onConfirmRemoveResale = async () => {
|
|
125
|
+
try {
|
|
126
|
+
setLoading(true)
|
|
127
|
+
await removeFromResale(activeTicket.hash)
|
|
128
|
+
const updatedData = { ...data }
|
|
129
|
+
updatedData?.tickets?.forEach((ticket: ITicketTypes) => {
|
|
130
|
+
if(ticket.hash === activeTicket.hash) {
|
|
131
|
+
ticket.is_sellable = true
|
|
132
|
+
ticket.is_on_sale = false
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
setData(updatedData)
|
|
137
|
+
} catch (error) {
|
|
138
|
+
// ...
|
|
139
|
+
} finally {
|
|
140
|
+
setShowRemoveResaleModal(false)
|
|
141
|
+
setLoading(false)
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
68
145
|
return (
|
|
69
146
|
<div className="order-details">
|
|
70
147
|
{loading ? (
|
|
@@ -97,7 +174,7 @@ export const OrderDetailsContainer = ({
|
|
|
97
174
|
</TableRow>
|
|
98
175
|
</TableHead>
|
|
99
176
|
<TableBody>
|
|
100
|
-
{data?.items
|
|
177
|
+
{data?.items?.ticket_types?.map(
|
|
101
178
|
(ticket: TicketTypes, index: number) => (
|
|
102
179
|
<TableRow key={index}>
|
|
103
180
|
<TableCell>
|
|
@@ -110,7 +187,7 @@ export const OrderDetailsContainer = ({
|
|
|
110
187
|
</TableRow>
|
|
111
188
|
)
|
|
112
189
|
)}
|
|
113
|
-
{data?.items
|
|
190
|
+
{data?.items?.add_ons?.map(
|
|
114
191
|
(ticket: TicketTypes, index: number) => (
|
|
115
192
|
<TableRow key={index}>
|
|
116
193
|
<TableCell>
|
|
@@ -133,7 +210,11 @@ export const OrderDetailsContainer = ({
|
|
|
133
210
|
</Table>
|
|
134
211
|
</TableContainer>
|
|
135
212
|
</div>
|
|
136
|
-
<TicketsTable
|
|
213
|
+
<TicketsTable
|
|
214
|
+
tickets={data.tickets}
|
|
215
|
+
handleSellTicket={handleSellTicket}
|
|
216
|
+
handleRemoveFromResale={handleRemoveFromResale}
|
|
217
|
+
/>
|
|
137
218
|
<div className="return-button-container">
|
|
138
219
|
<button
|
|
139
220
|
type="button"
|
|
@@ -149,6 +230,20 @@ export const OrderDetailsContainer = ({
|
|
|
149
230
|
</div>
|
|
150
231
|
</>
|
|
151
232
|
)}
|
|
233
|
+
{showResaleModal && (
|
|
234
|
+
<TicketResaleModal
|
|
235
|
+
ticket={activeTicket}
|
|
236
|
+
onClose={handleOnClose}
|
|
237
|
+
onSubmit={handleOnSubmit}
|
|
238
|
+
/>
|
|
239
|
+
)}
|
|
240
|
+
{showRemoveResaleModal && (
|
|
241
|
+
<ConfirmModal
|
|
242
|
+
message="Are you sure you want to withdraw your ticket from resale?"
|
|
243
|
+
onClose={onCloseRemoveResale}
|
|
244
|
+
onConfirm={onConfirmRemoveResale}
|
|
245
|
+
/>
|
|
246
|
+
)}
|
|
152
247
|
</div>
|
|
153
248
|
)
|
|
154
249
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
top: 0;
|
|
13
13
|
left: 0;
|
|
14
14
|
background-color: rgba(0, 0, 0, .4);
|
|
15
|
+
z-index: 1400;
|
|
15
16
|
}
|
|
16
17
|
.order-details .layout-title {
|
|
17
18
|
font-size: 24px;
|
|
@@ -39,13 +40,13 @@
|
|
|
39
40
|
.order-details .ticket-add-on-table {
|
|
40
41
|
background-color: #fcf8e3;;
|
|
41
42
|
}
|
|
42
|
-
.order-details .
|
|
43
|
-
width:
|
|
43
|
+
.order-details .action-button {
|
|
44
|
+
width: max-content;
|
|
44
45
|
font-weight: 400;
|
|
45
|
-
font-size:
|
|
46
|
+
font-size: 14px;
|
|
46
47
|
line-height: normal;
|
|
47
48
|
min-height: auto;
|
|
48
|
-
padding: 12px
|
|
49
|
+
padding: 12px;
|
|
49
50
|
border: 1px solid white;
|
|
50
51
|
margin-top: 20px;
|
|
51
52
|
margin-bottom: 20px;
|
|
@@ -12,20 +12,31 @@ interface IAddOnTypes {
|
|
|
12
12
|
name: string;
|
|
13
13
|
status: string;
|
|
14
14
|
}
|
|
15
|
-
interface ITicketTypes {
|
|
15
|
+
export interface ITicketTypes {
|
|
16
16
|
add_ons?: IAddOnTypes[];
|
|
17
17
|
hash: string;
|
|
18
18
|
ticket_type: string;
|
|
19
19
|
holder_name: string;
|
|
20
20
|
status: string;
|
|
21
21
|
pdf_link: string;
|
|
22
|
+
is_sellable: boolean;
|
|
23
|
+
is_on_sale?: boolean;
|
|
24
|
+
event_name: string;
|
|
25
|
+
currency: string;
|
|
26
|
+
resale_fee_amount: number | string;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
interface TicketsTableTypes {
|
|
25
30
|
tickets: ITicketTypes[];
|
|
31
|
+
handleSellTicket: (ticket: ITicketTypes) => void;
|
|
32
|
+
handleRemoveFromResale: (ticket: ITicketTypes) => void;
|
|
26
33
|
}
|
|
27
34
|
|
|
28
|
-
const TicketsTable = ({
|
|
35
|
+
const TicketsTable = ({
|
|
36
|
+
tickets = [],
|
|
37
|
+
handleSellTicket = () => {},
|
|
38
|
+
handleRemoveFromResale = () => {}
|
|
39
|
+
}: TicketsTableTypes) => (
|
|
29
40
|
<div className="tickets-box">
|
|
30
41
|
<h4 className="sub-title">Your Tickets</h4>
|
|
31
42
|
<TableContainer component={Paper}>
|
|
@@ -37,6 +48,7 @@ const TicketsTable = ({ tickets = [] }: TicketsTableTypes) => (
|
|
|
37
48
|
<TableCell>Ticket Holder Name</TableCell>
|
|
38
49
|
<TableCell>Status</TableCell>
|
|
39
50
|
<TableCell>Download</TableCell>
|
|
51
|
+
<TableCell />
|
|
40
52
|
</TableRow>
|
|
41
53
|
</TableHead>
|
|
42
54
|
<TableBody>
|
|
@@ -50,16 +62,36 @@ const TicketsTable = ({ tickets = [] }: TicketsTableTypes) => (
|
|
|
50
62
|
<TableCell>
|
|
51
63
|
<span
|
|
52
64
|
aria-hidden={true}
|
|
53
|
-
className="
|
|
65
|
+
className="action-button"
|
|
54
66
|
onClick={() => downloadPDF(ticket.pdf_link)}
|
|
55
67
|
>
|
|
56
68
|
Download
|
|
57
69
|
</span>
|
|
58
70
|
</TableCell>
|
|
71
|
+
<TableCell>
|
|
72
|
+
{ticket.is_sellable && (
|
|
73
|
+
<span
|
|
74
|
+
aria-hidden={true}
|
|
75
|
+
className="action-button"
|
|
76
|
+
onClick={() => handleSellTicket(ticket)}
|
|
77
|
+
>
|
|
78
|
+
Sell Ticket
|
|
79
|
+
</span>
|
|
80
|
+
)}
|
|
81
|
+
{ticket.is_on_sale && (
|
|
82
|
+
<span
|
|
83
|
+
aria-hidden={true}
|
|
84
|
+
className="action-button"
|
|
85
|
+
onClick={() => handleRemoveFromResale(ticket)}
|
|
86
|
+
>
|
|
87
|
+
Remove from Resale
|
|
88
|
+
</span>
|
|
89
|
+
)}
|
|
90
|
+
</TableCell>
|
|
59
91
|
</TableRow>
|
|
60
92
|
{!!ticket.add_ons?.length && (
|
|
61
93
|
<TableRow>
|
|
62
|
-
<TableCell colSpan={
|
|
94
|
+
<TableCell colSpan={6}>
|
|
63
95
|
<Table className="ticket-add-on-table">
|
|
64
96
|
<TableHead>
|
|
65
97
|
<TableRow>
|
|
@@ -26,6 +26,7 @@ import { ThemeProvider, createTheme } from '@mui/material/styles'
|
|
|
26
26
|
import { ThemeOptions } from '@mui/material'
|
|
27
27
|
import { CSSProperties } from '@mui/styles'
|
|
28
28
|
import TimerWidget from '../timerWidget'
|
|
29
|
+
import { Loader } from '../common/index'
|
|
29
30
|
|
|
30
31
|
const publishableKey = CONFIGS.STRIPE_PUBLISHABLE_KEY || ''
|
|
31
32
|
|
|
@@ -45,13 +46,6 @@ const getStripePromise = (reviewData: any) => {
|
|
|
45
46
|
return loadStripe(stripePublishableKey, options)
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
function Loader() {
|
|
49
|
-
return (
|
|
50
|
-
<div className="loader-container">
|
|
51
|
-
<CircularProgress />
|
|
52
|
-
</div>
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
49
|
export interface IPaymentPage {
|
|
56
50
|
paymentFields: IPaymentField[];
|
|
57
51
|
handlePayment: any;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { StripeCardNumberElementOptions } from '@stripe/stripe-js'
|
|
10
10
|
import _identity from 'lodash/identity'
|
|
11
11
|
import _get from 'lodash/get'
|
|
12
|
-
import { CheckboxField } from '../common/
|
|
12
|
+
import { CheckboxField } from '../common/index'
|
|
13
13
|
|
|
14
14
|
import './style.css'
|
|
15
15
|
import { getCurrencySymbolByCurrency } from '../../normalizers'
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import _get from 'lodash/get'
|
|
3
|
+
import { checkTicketStatus } from '../../api'
|
|
4
|
+
import { AxiosError } from 'axios'
|
|
5
|
+
|
|
6
|
+
export interface ITicketResaleContainer {
|
|
7
|
+
onCheckTicketStatusSuccess: (res: any) => void
|
|
8
|
+
onCheckTicketStatusError: (e: AxiosError) => void
|
|
9
|
+
orderHash?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const TicketResaleContainer = ({
|
|
13
|
+
onCheckTicketStatusSuccess = () => {},
|
|
14
|
+
onCheckTicketStatusError = () => {},
|
|
15
|
+
orderHash,
|
|
16
|
+
}: ITicketResaleContainer) => {
|
|
17
|
+
const isWindowDefined = typeof window !== 'undefined'
|
|
18
|
+
const [error, setError] = useState(null)
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
(async () => {
|
|
22
|
+
if (isWindowDefined) {
|
|
23
|
+
const params: URLSearchParams = new URL(`${window.location}`)
|
|
24
|
+
.searchParams
|
|
25
|
+
const hash = params.get('o') || orderHash || null
|
|
26
|
+
|
|
27
|
+
if (hash) {
|
|
28
|
+
try {
|
|
29
|
+
const response = await checkTicketStatus(hash)
|
|
30
|
+
const data = _get(response, 'data.data.attributes')
|
|
31
|
+
const age_required = _get(data, 'age_required', false)
|
|
32
|
+
const names_required = _get(data, 'names_required', false)
|
|
33
|
+
const event_id = _get(data, 'event_id')
|
|
34
|
+
|
|
35
|
+
onCheckTicketStatusSuccess(response.data)
|
|
36
|
+
window.location.href = `/billing/billing-info/?age_required=${age_required}&names_required=${names_required}&event_id=${event_id}`
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.log(error)
|
|
39
|
+
setError(error?.response?.data?.message)
|
|
40
|
+
onCheckTicketStatusError(error.response)
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
window.location.href = '/'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
})()
|
|
47
|
+
}, [])
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<div className="ticket-resale-page">
|
|
51
|
+
<div className="error-block">
|
|
52
|
+
<h3>{error}</h3>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}
|