Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…lfinance into feature/bugfixes-dev
  • Loading branch information
npy11 authored and npy11 committed Oct 9, 2024
2 parents 17f1fda + e290103 commit 80889ee
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 117 deletions.
6 changes: 3 additions & 3 deletions blocks/boards/boards.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ export default async function decorate(block) {
const tbody = document.createElement('tbody');

const header = !block.classList.contains('no-header');
if (header) table.append(thead);
// if (header) table.append(thead);
table.append(tbody);

[...block.children].forEach((child, i) => {
const row = document.createElement('tr');
// if (header && i === 0) thead.append(row);
// else
tbody.append(row);
// [...child.children].forEach((col) => {
[...child.firstElementChild?.firstElementChild?.children]?.forEach((col) => {
// [...child.firstElementChild?.firstElementChild?.children]?.forEach((col) => {
[...child.children].forEach((col) => {
const cell = buildCell(header ? i : i + 1);
if (col.innerHTML.includes('img') && col.textContent.trim()) {
col.remove();
Expand Down
28 changes: 16 additions & 12 deletions blocks/columns/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import { decorateViewMore } from "../../scripts/scripts.js";
import { statemasterGetStatesApi } from '../applyloanform/statemasterapi.js';
import { validationJSFunc } from '../applyloanform/validation.js';
import { formOpen } from '../applyloanform/applyloanforms.js';

import decorateTable from "../boards/boards.js";

export default function decorate(block) {
if (block.classList.contains('table')) {
decorateTable(block);
return block;
}
decorateViewMore(block);
const cols = [...block.firstElementChild.children];
block.classList.add(`columns-${cols.length}-cols`);
Expand All @@ -31,16 +35,16 @@ export default function decorate(block) {
}


function openFormColumn(block){
var sectionBlock = block.closest(".section");
if(sectionBlock.classList.contains('open-form-on-click-column')){
sectionBlock.querySelector('.open-form-on-click-column .columns-wrapper').querySelectorAll('.button-container').forEach(function (eachApplyFormClick) {
eachApplyFormClick.addEventListener('click', async (e) => {
statemasterGetStatesApi();
validationJSFunc();
formOpen();
e.preventDefault();
});
function openFormColumn(block) {
var sectionBlock = block.closest(".section");
if (sectionBlock.classList.contains('open-form-on-click-column')) {
sectionBlock.querySelector('.open-form-on-click-column .columns-wrapper').querySelectorAll('.button-container').forEach(function (eachApplyFormClick) {
eachApplyFormClick.addEventListener('click', async (e) => {
statemasterGetStatesApi();
validationJSFunc();
formOpen();
e.preventDefault();
});
}
});
}
}
19 changes: 18 additions & 1 deletion component-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,23 @@
{
"id": "columns",
"fields": [
{
"component": "multiselect",
"name": "classes",
"label": "Style",
"valueType": "string",
"options": [
{
"name": "Type",
"children": [
{
"name": "Table",
"value": "table"
}
]
}
]
},
{
"component": "text",
"valueType": "number",
Expand Down Expand Up @@ -2831,4 +2848,4 @@
}
]
}
]
]
130 changes: 29 additions & 101 deletions styles/documents-required/documents-required.css
Original file line number Diff line number Diff line change
Expand Up @@ -136,91 +136,23 @@
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary::before{
content: none;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(1) details{
position: relative;
padding-left: unset;
padding-right: 0;
padding-bottom: unset;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(1) details::before{
position: absolute;
background-image: url('/images/kycdoc.svg');
left: 0;
top: 40px;
object-fit: contain;
content:'';
height: 32px;
margin-right: 24px;
width: 32px;
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details {
padding: unset;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(2) details{
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary>div{
position: relative;
padding-left: unset;
padding-right: 0;
padding-bottom: unset;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(2) details::before{
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary>div p>span {
position: absolute;
background-image: url('/images/income.svg');
left: 0;
top: 40px;
object-fit: contain;
content:'';
height: 32px;
margin-right: 24px;
width: 32px;
left: 2px;
top: 12px;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(3) details{
position: relative;
padding-left: unset;
padding-right: 0;
padding-bottom: unset;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(3) details::before{
position: absolute;
background-image: url('/images/property.svg');
left: 0;
top: 40px;
object-fit: contain;
content:'';
height: 32px;
margin-right: 24px;
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary>div p>span,
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary>div p>span>img {
width: 32px;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(4) details{
position: relative;
padding-left: unset;
padding-right: 0;
padding-bottom: unset;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(4) details::before{
position: absolute;
background-image: url('/images/coapplicants.svg');
left: 0;
top: 30px;
object-fit: contain;
content:'';
height: 32px;
margin-right: 24px;
width: 32px;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(5) details{
position: relative;
padding-left: unset;
padding-right: 0;
padding-bottom: unset;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(5) details::before{
position: absolute;
background-image: url('/images/photodocm.svg');
left: 0;
top: 30px;
object-fit: contain;
content:'';
height: 32px;
margin-right: 24px;
width: 32px;
}

.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion.block{
border-bottom: 1px dashed #ccc;
}
Expand Down Expand Up @@ -407,21 +339,21 @@ table {
font-family: 'Nunito-Regular', sans-serif;
}

.section.documents-required-brown.documents-required-img-align .accordion-group-wrapper .accordion-group .accordion details:not(:has(p))::before {
top: 30px;
.section.documents-required-brown.documents-required-img-align .accordion-group-wrapper .accordion-group .accordion details summary>div:not(:has(p:last-child)) p>span{
top: -2px;
}

.section.documents-required-brown.documents-required-img-align .accordion-group-wrapper .accordion-group .accordion details:not(:has(p)) summary>div::before {
.section.documents-required-brown.documents-required-img-align .accordion-group-wrapper .accordion-group .accordion details:not(:has(p:last-child)) summary>div::before {
top: 0;
}

.section.documents-required-brown.document-required-accordion-img-swap .accordion-group-wrapper .accordion-group .accordion:nth-last-child(2) details::before{
/* .section.documents-required-brown.document-required-accordion-img-swap .accordion-group-wrapper .accordion-group .accordion:nth-last-child(2) details::before{
background-image: url('/images/coapplicants.svg');
}
} */

.section.documents-required-brown.document-required-accordion-img-swap .accordion-group-wrapper .accordion-group .accordion:last-child details::before{
/* .section.documents-required-brown.document-required-accordion-img-swap .accordion-group-wrapper .accordion-group .accordion:last-child details::before{
background-image: url('/images/photodocm.svg');
}
} */

.section.documents-required-brown.document-required-accordion-img table:nth-child(2) > tbody > tr> th:nth-child(3),
.section.documents-required-brown.document-required-accordion-img table:nth-child(2) > tbody > tr> th:nth-child(2),
Expand Down Expand Up @@ -517,18 +449,6 @@ table {
/* top: unset; */
width: 100%;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(1) details::before,
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(2) details::before,
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(3) details::before,
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(4) details::before,
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(5) details::before{
height: 24px;
width: 24px;
margin-right: 16px;
background-size: 100%;
top: 26px;
margin-left: 12px;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary div h3{
font-size: 0.875rem;
line-height: 20px;
Expand All @@ -546,11 +466,6 @@ table {
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(4) details summary div{
padding-left: 51px;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(4) details::before,
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion:nth-child(5) details::before{
top: 15px;
margin-left: 12px;
}
.section.documents-required-brown .accordion-group{
border-radius: 12px;
padding: 12px 16px;
Expand Down Expand Up @@ -697,6 +612,16 @@ table {
.section.documents-required-brown.document-required-accordion-img table:nth-child(9) > tbody > tr > td:nth-last-child(2) {
width: 20%;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary>div p>span {
position: absolute;
left: 12px;
top: 10px;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary>div p>span,
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary>div p>span>img {
width: 24px;
height: 24px;
}
}
@media screen and (min-width:768px) and (max-width:1024px) {
.section.documents-required-brown .default-content-wrapper .button-container{
Expand All @@ -711,6 +636,9 @@ table {
.section.documents-required-brown .accordion-group-wrapper {
margin-bottom: unset;
}
.section.documents-required-brown .accordion-group-wrapper .accordion-group .accordion details summary>div p>span {
top: 10px;
}
}

@media screen and (min-width: 1025px) and (max-width: 1300px){
Expand Down

0 comments on commit 80889ee

Please sign in to comment.