[FIX] portal: remove no document message

Remove `No documents to display` as there will always be aa least
the addresses and security/connection cards.

closes odoo/odoo#146197

Task-id: 3629038
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
This commit is contained in:
Florian Damhaut
2024-02-20 14:57:23 +00:00
committed by Arnaud Joset
parent d75343d7d8
commit 52f36f5c14
2 changed files with 0 additions and 6 deletions
-5
View File
@@ -105,12 +105,7 @@ export const PortalHomeCounters = publicWidget.Widget.extend({
return documentsCountersData;
});
return Promise.all(proms).then((results) => {
const counters = results.reduce((prev, current) => Object.assign({...prev, ...current}), {});
this.el.querySelector('.o_portal_doc_spinner').remove();
// Display a message when there are no documents available if there are no counters > 0 and no counters always shown
if (!countersAlwaysDisplayed.length && !Object.values(counters).filter((val) => val > 0).length) {
this.el.querySelector('.o_portal_no_doc_message').classList.remove('d-none');
}
});
},
});
-1
View File
@@ -222,7 +222,6 @@
<div class="oe_structure" id="oe_structure_portal_my_home_1"/>
<div class="o_portal_docs row g-2">
<div class="o_portal_doc_spinner spinner-border text-o-color-2 align-self-center mt-5"/>
<p class="o_portal_no_doc_message d-none">No Documents to display</p>
<div t-if="portal_alert_category_enable" class="o_portal_category row g-2 mt-3" id="portal_alert_category"/>
<div t-if="portal_client_category_enable" class="o_portal_category row g-2 mt-3" id="portal_client_category"/>
<div t-if="portal_service_category_enable" class="o_portal_category row g-2 mt-3" id="portal_service_category"/>