code refactoring
This commit is contained in:
parent
2ea6f1ebaa
commit
0d6eefd2b6
@ -860,6 +860,7 @@ ul {
|
||||
color: inherit;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
align-items: center;
|
||||
gap: 0.8rem;
|
||||
background-color: rgba(var(--foreground-color), 1);
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
@ -871,11 +872,10 @@ ul {
|
||||
padding: 0.6rem;
|
||||
border-radius: 2rem;
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
margin-right: 1rem;
|
||||
}
|
||||
.sheet-card h4 {
|
||||
opacity: 0.9;
|
||||
font-size: 1rem;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
.sheet-card__type {
|
||||
font-size: 0.8rem;
|
||||
|
||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -850,6 +850,7 @@ ul {
|
||||
color: inherit;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
align-items: center;
|
||||
gap: 0.8rem;
|
||||
background-color: rgba(var(--foreground-color), 1);
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
@ -860,11 +861,10 @@ ul {
|
||||
padding: 0.6rem;
|
||||
border-radius: 2rem;
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
margin-right: 1rem;
|
||||
}
|
||||
h4 {
|
||||
opacity: 0.9;
|
||||
font-size: 1rem;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
&__type {
|
||||
font-size: 0.8rem;
|
||||
|
||||
31
index.html
31
index.html
@ -18,7 +18,7 @@
|
||||
blockchain: "FLO",
|
||||
adminID: "FKAEdnPfjXLHSYwrXQu377ugN4tXU7VGdf", //"FRaBr5F665RVkQ1A1EYrMfbX2UF52vWjKr",
|
||||
application: "TEST_MODE", // "LogSheet",
|
||||
// for storing signle log sheet data
|
||||
// for storing single log sheet data
|
||||
currentSheet: {}
|
||||
}
|
||||
</script>
|
||||
@ -54,10 +54,6 @@
|
||||
//request object data from Supernode
|
||||
logSheet.init().then(result => {
|
||||
console.log(result)
|
||||
//Render the personList and sheetList
|
||||
renderPersonList()
|
||||
renderSheetList()
|
||||
//hide loading screen
|
||||
hideLoader()
|
||||
showPage(window.location.hash, { firstLoad: true })
|
||||
//display add buttons if subAdmin, else hide
|
||||
@ -998,8 +994,10 @@
|
||||
getRef('sheet_type').textContent = ''
|
||||
getRef('sheet_description').textContent = ''
|
||||
getRef('main_header').classList.remove('hidden')
|
||||
renderSheetList()
|
||||
break;
|
||||
case 'sheet_view':
|
||||
renderPersonList()
|
||||
if (params) {
|
||||
viewSheet(params.id)
|
||||
}
|
||||
@ -1200,7 +1198,6 @@
|
||||
}
|
||||
allFormElements.forEach(element => element.disabled = true)
|
||||
logSheet.enterLog(sheetId, floID, log).then(result => {
|
||||
allFormElements.forEach(element => element.disabled = false)
|
||||
form.reset();
|
||||
notify('Log entry successful', 'success')
|
||||
getRef('sheet_container__body').prepend(html.node`
|
||||
@ -1212,6 +1209,7 @@
|
||||
`)
|
||||
}).catch(error => {
|
||||
notify(error, "error")
|
||||
}).finally(() => {
|
||||
allFormElements.forEach(element => element.disabled = false)
|
||||
})
|
||||
}
|
||||
@ -1261,17 +1259,6 @@
|
||||
}
|
||||
renderElem(getRef('sheets_container'), html`${list}`)
|
||||
}
|
||||
|
||||
function createTh(text) {
|
||||
let cell = document.createElement('th')
|
||||
cell.textContent = text
|
||||
return cell
|
||||
}
|
||||
function createCell(text) {
|
||||
let cell = document.createElement('td')
|
||||
cell.textContent = text
|
||||
return cell
|
||||
}
|
||||
let startingIndex = 0,
|
||||
endingIndex = 0
|
||||
|
||||
@ -1360,15 +1347,9 @@
|
||||
}
|
||||
getRef('sheet_container__body').append(frag)
|
||||
if (!onlyRenderTable) {
|
||||
//Add options for groupBy
|
||||
getRef('group_by_title').textContent = `Group ${title} by`;
|
||||
let colSelect = clearElement(getRef('group_by_menu').children[1]);
|
||||
attributes.forEach(a => {
|
||||
let opt = document.createElement('sm-option');
|
||||
opt.setAttribute('value', a);
|
||||
opt.textContent = a;
|
||||
colSelect.appendChild(opt)
|
||||
})
|
||||
//Add options for groupBy
|
||||
renderElem(getRef('second_select'), html`${attributes.map(attr => html`<sm-option value="${attr}">${attr}</sm-option>`)}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user