mirror of
https://github.com/Floriansylvain/Exo-technique-VIE-Barcelone-SaaS-HRTech.git
synced 2026-08-19 19:53:23 +02:00
feat: initial impl w/ styles, scripts, & server-side logic (steps 1, 2, 3)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
export function renderError(container, message) {
|
||||
if (!container) return;
|
||||
try {
|
||||
const $c = (container.jquery) ? container : (typeof container === 'string' ? $(container) : $(container));
|
||||
$c.html(`<div class="error-message">${String(message)}</div>`);
|
||||
} catch (e) {
|
||||
if (container instanceof Element) container.innerHTML = `<div class="error-message">${String(message)}</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
export function insertHtml(container, html) {
|
||||
if (!container) return;
|
||||
try {
|
||||
const $c = (container.jquery) ? container : (typeof container === 'string' ? $(container) : $(container));
|
||||
$c.html(html);
|
||||
} catch (e) {
|
||||
if (container instanceof Element) container.innerHTML = html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user