-
- = $initial ?>
+
+
+
 ?>?v=<?= time() ?>)
+
+ = $initial ?>
+
= $tm['mood'] ?>
@@ -325,11 +373,6 @@ if (empty($_SESSION['dash_logged_today'])) {
-
-
- Your mood is visible to your team: = $my_mood ?>
-
-
@@ -337,12 +380,9 @@ if (empty($_SESSION['dash_logged_today'])) {
🕓 Recent Activity
-
- All Users
-
- = $is_admin_user ? 'All activity across platform' : 'You & your groups' ?>
+ You & your groups
t.classList.remove('show'), 3000);
}
+ // ── Custom Alert / Confirm ─────────────────────────────────────────────
+ function appAlert(msg) {
+ return new Promise(resolve => {
+ let modal = document.getElementById('app-alert-modal');
+ if(!modal) {
+ modal = document.createElement('div');
+ modal.id = 'app-alert-modal';
+ modal.className = 'modal-overlay';
+ modal.style.zIndex = '10005';
+ modal.innerHTML = `
+
`;
+ document.body.appendChild(modal);
+ }
+ document.getElementById('app-alert-msg').textContent = msg;
+ modal.classList.add('active');
+ document.getElementById('app-alert-ok').onclick = () => { modal.classList.remove('active'); resolve(true); };
+ });
+ }
+ window.alert = function(msg) { appAlert(msg); };
+
+ function appConfirm(msg) {
+ return new Promise(resolve => {
+ let modal = document.getElementById('app-confirm-modal');
+ if(!modal) {
+ modal = document.createElement('div');
+ modal.id = 'app-confirm-modal';
+ modal.className = 'modal-overlay';
+ modal.style.zIndex = '10005';
+ modal.innerHTML = `
+
+
Confirmation
+
+
+
+
+
+
`;
+ document.body.appendChild(modal);
+ }
+ document.getElementById('app-confirm-msg').textContent = msg;
+ modal.classList.add('active');
+ document.getElementById('app-confirm-no').onclick = () => { modal.classList.remove('active'); resolve(false); };
+ document.getElementById('app-confirm-yes').onclick = () => { modal.classList.remove('active'); resolve(true); };
+ });
+ }
+
+ function appConfirmUrl(event, url, msg) {
+ event.preventDefault();
+ appConfirm(msg).then(yes => { if(yes) window.location.href = url; });
+ }
+
// ── Sidebar Collapse ──────────────────────────────────────────────────
function toggleSidebar() {
const collapsed = document.body.classList.toggle('sidebar-collapsed');
@@ -87,6 +142,19 @@
document.getElementById('change-pw-modal').classList.add('active');
});
+
+ // ── Tagify globally ───────────────────────────────────────────────────
+ document.addEventListener('DOMContentLoaded', () => {
+ if(typeof Tagify !== 'undefined' && window.APP_GLOBAL_TAGS) {
+ document.querySelectorAll('.tagify-input').forEach(el => {
+ new Tagify(el, {
+ whitelist: window.APP_GLOBAL_TAGS,
+ dropdown: { maxItems: 20, classname: "tags-look", enabled: 0, closeOnSelect: false },
+ originalInputValueFormat: valuesArr => valuesArr.map(item => item.value).join(',')
+ });
+ });
+ }
+ });