From a954c37d2d0c7d13281efd2b7bd32d3cd048a5e8 Mon Sep 17 00:00:00 2001 From: Vaibhav sasulkar Date: Wed, 9 Oct 2024 13:11:01 +0530 Subject: [PATCH 1/2] document required images added from colan --- .../documents-required/documents-required.css | 130 ++++-------------- 1 file changed, 29 insertions(+), 101 deletions(-) diff --git a/styles/documents-required/documents-required.css b/styles/documents-required/documents-required.css index 299ffaa52f..7096c936c1 100644 --- a/styles/documents-required/documents-required.css +++ b/styles/documents-required/documents-required.css @@ -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; } @@ -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), @@ -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; @@ -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; @@ -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{ @@ -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){ From a2b8ac43c22bd69ff7510d1b575b50cffc46a84b Mon Sep 17 00:00:00 2001 From: Vaibhav sasulkar Date: Wed, 9 Oct 2024 16:27:36 +0530 Subject: [PATCH 2/2] in columns add table --- blocks/boards/boards.js | 6 +++--- blocks/columns/columns.js | 28 ++++++++++++++++------------ component-models.json | 19 ++++++++++++++++++- 3 files changed, 37 insertions(+), 16 deletions(-) diff --git a/blocks/boards/boards.js b/blocks/boards/boards.js index 4155420276..8a869c7279 100644 --- a/blocks/boards/boards.js +++ b/blocks/boards/boards.js @@ -19,7 +19,7 @@ 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) => { @@ -27,8 +27,8 @@ export default async function decorate(block) { // 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(); diff --git a/blocks/columns/columns.js b/blocks/columns/columns.js index ffa286b966..52d5026388 100644 --- a/blocks/columns/columns.js +++ b/blocks/columns/columns.js @@ -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`); @@ -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(); }); - } + }); + } } diff --git a/component-models.json b/component-models.json index 3a1c7cb52c..bd0c706d9f 100644 --- a/component-models.json +++ b/component-models.json @@ -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", @@ -2831,4 +2848,4 @@ } ] } -] +] \ No newline at end of file