@@ -10366,7 +10351,6 @@ Bitcoin.Util = {
}
set data(obj){
const {
- termTxHref,
fundTxHref,
startDate,
endDate,
@@ -10388,8 +10372,10 @@ Bitcoin.Util = {
for (let item in this.totalNet){
this.totalNet[item] = parseFloat(this.totalNet[item])
}
-
- this.shadow.querySelector('.term-link').href = termTxHref
+ if(investorsFrag.childElementCount > 1)
+ this.shadow.querySelector('.fund-link').href = fundTxHref
+ else
+ this.shadow.querySelector('.fund-link').classList.add("hide-completely");
this.shadow.querySelector('.start-date').textContent = startDate
this.shadow.querySelector('.end-date').textContent = endDate
this.shadow.querySelector('.base-usd').textContent = `₹${baseUsd}`
@@ -10397,18 +10383,20 @@ Bitcoin.Util = {
this.shadow.querySelector('.investors-group-list').append(investorsFrag)
this.toggleCurrency()
-
- const tapoutsFrag = document.createDocumentFragment()
- for(let tapout in tapouts){
- const tapoutPoint = document.createElement('li')
- tapoutPoint.classList.add('grid')
- tapoutPoint.innerHTML = `
-
${tapout}
-
${tapouts[tapout]}
- `
- tapoutsFrag.append(tapoutPoint)
- }
- this.shadow.querySelector('.tapout-list').append(tapoutsFrag)
+ if(Object.keys(tapouts).length){
+ const tapoutsFrag = document.createDocumentFragment()
+ for(let tapout in tapouts){
+ const tapoutPoint = document.createElement('li')
+ tapoutPoint.classList.add('grid')
+ tapoutPoint.innerHTML = `
+
${tapout}
+
${tapouts[tapout]}
+ `
+ tapoutsFrag.append(tapoutPoint)
+ }
+ this.shadow.querySelector('.tapout-list').append(tapoutsFrag)
+ } else
+ this.shadow.querySelector('.tapout-container').classList.add("hide-completely")
}
toggleCurrency = () => {
@@ -10424,7 +10412,7 @@ Bitcoin.Util = {
investorInput.classList.add('investor-input', 'grid')
investorInput.innerHTML = `
-
+
@@ -10676,7 +10664,7 @@ Bitcoin.Util = {
getRef('get_fund_private_key').value = ''
}
if(target === 'home_page'){
- getRef("create_term_form").reset()
+ //getRef("create_term_form").reset()
getRef("create_fund_form").reset()
}
if(target === 'loading_page' || target === 'error_page'){
@@ -10746,6 +10734,17 @@ Bitcoin.Util = {
getRef('fund_selector_container').classList.add('hide-completely')
}
})
+
+ getRef('tapout_toggle').addEventListener('change', e => {
+ if(!e.detail.checked){
+ getRef('tapout_container').classList.add('hide-completely')
+ getRef('tapout_container').querySelectorAll('input').forEach(input => input.disabled = true)
+ }
+ else{
+ getRef('tapout_container').classList.remove('hide-completely')
+ getRef('tapout_container').querySelectorAll('input').forEach(input => input.disabled = false)
+ }
+ })
/* function renderfundPlaceholder(){
getRef('fund_list').innerHTML = ``
const frag = document.createDocumentFragment()
@@ -10755,17 +10754,17 @@ Bitcoin.Util = {
getRef('fund_list').append(frag)
} */
- getRef('term_selector').addEventListener('change', e => {
+/* getRef('term_selector').addEventListener('change', e => {
const floID = e.detail.value
- getRef('fund_selector').querySelectorAll('.term-fund__option-group').forEach(option => option.classList.add('hide-completely'))
- getRef('fund_selector').querySelector(`.term-fund__option-group[data-flo-id="${floID}"]`)?.classList.remove('hide-completely')
- })
+ getRef('fund_selector').querySelectorAll('.fund-option').forEach(option => option.classList.add('hide-completely'))
+ getRef('fund_selector').querySelector(`.fund-option[data-flo-id="${floID}"]`)?.classList.remove('hide-completely')
+ }) */
+