Spaces:
Running
Running
create a project management that features centralize work with flexible views (List, Board, Calendar, Timeline), robust task management (dependencies, custom fields, subtasks), powerful automation (rules, workflows), team collaboration tools (Inbox, comments, status updates), and advanced reporting (dashboards, portfolios) to provide visibility, accountability, and streamline projects from start to finish.
Browse filesFiles changed (14)
- README.md+8-5
- automation.htmlAdded+182
- components/automation-rule.jsAdded+252
- components/inbox-item.jsAdded+194
- components/navbar.jsAdded+261
- components/project-card.jsAdded+267
- components/report-card.jsAdded+168
- components/sidebar.jsAdded+336
- components/task-item.jsAdded+390
- inbox.htmlAdded+109
- index.html+196-19
- reporting.htmlAdded+113
- script.jsAdded+311
- style.css+235-19
12345678910---title: Workflowwizard Proemoji: 👁colorFrom: purplecolorTo: redsdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference12345678910111213---title: WorkflowWizard Pro 🪄colorFrom: pinkcolorTo: grayemoji: 🐳sdk: staticpinned: falsetags:- deepsite-v3---# Welcome to your new DeepSite project!This project was created with [DeepSite](https://huggingface.co/deepsite).
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>WorkflowWizard Pro - Automation</title> <link rel="icon" type="image/x-icon" href="favicon.ico"> <script src="https://cdn.tailwindcss.com"></script> <script> tailwind.config = { theme: { extend: { colors: { primary: { 50: '#fef2f2', 100: '#fee2e2', 200: '#fecaca', 300: '#fca5a5', 400: '#f87171', 500: '#ef4444', 600: '#dc2626', 700: '#b91c1c', 800: '#991b1b', 900: '#7f1d1d', } } } } } </script> <link rel="stylesheet" href="style.css"> <script src="https://unpkg.com/feather-icons"></script> <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> <script src="components/navbar.js"></script> <script src="components/sidebar.js"></script> <script src="components/automation-rule.js"></script></head><body class="bg-gray-50 min-h-screen"> <custom-navbar></custom-navbar> <div class="flex"> <custom-sidebar active-page="automation"></custom-sidebar> <main class="flex-1 p-6 md:p-8 ml-0 md:ml-64 mt-16"> <!-- Automation Header --> <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8"> <div> <h1 class="text-3xl font-bold text-gray-900">Workflow Automation 🚀</h1> <p class="text-gray-600 mt-2">Create rules to automate repetitive tasks and workflows</p> </div> <button class="mt-4 md:mt-0 bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-lg flex items-center gap-2 transition-colors duration-200 shadow-sm" onclick="openCreateRuleModal()"> <i data-feather="plus"></i> Create Rule </button> </div>
<!-- Rules Overview --> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8"> <custom-automation-rule name="Auto-assign urgent tasks" trigger="priority_changed" condition="priority = 'high'" action="assign_to_team_lead" status="active"> </custom-automation-rule> <custom-automation-rule name="Notify overdue tasks" trigger="due_date_passed" condition="completed = false" action="send_notification" status="active"> </custom-automation-rule> <custom-automation-rule name="Complete parent on subtask completion" trigger="subtask_completed" condition="all_subtasks_completed = true" action="complete_parent_task" status="draft"> </custom-automation-rule> </div>
<!-- Templates Section --> <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6"> <h2 class="text-xl font-semibold text-gray-900 mb-6">Rule Templates</h2> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> <div class="border-2 border-dashed border-gray-200 rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" onclick="openCreateRuleModal()"> <i data-feather="plus" class="w-8 h-8 text-gray-400 mx-auto"></i> <p class="text-sm text-gray-600 mt-2">Create Custom Rule</p> </div> <div class="border border-gray-200 rounded-lg p-4 cursor-pointer hover:bg-gray-50" onclick="applyTemplate('due_date_reminder')"> <i data-feather="calendar" class="w-8 h-8 text-blue-600 mx-auto"></i> <p class="text-sm font-medium text-gray-900 mt-2">Due Date Reminder</p> <p class="text-xs text-gray-500 mt-1">Send reminder before due date</p> </div> <div class="border border-gray-200 rounded-lg p-4 cursor-pointer hover:bg-gray-50" onclick="applyTemplate('status_update')"> <i data-feather="refresh-cw" class="w-8 h-8 text-green-600 mx-auto"></i> <p class="text-sm font-medium text-gray-900 mt-2">Status Update</p> <p class="text-xs text-gray-500 mt-1">Auto-update when conditions met</p> </div> </div> </div> </div> </main> </div>
<!-- Create Rule Modal --> <div id="create-rule-modal" class="modal hidden"> <div class="modal-overlay"></div> <div class="modal-content"> <div class="modal-header"> <h3 class="modal-title">Create Automation Rule</h3> <button class="modal-close" onclick="closeCreateRuleModal()"> <i data-feather="x"></i> </button> </div> <div class="modal-body"> <form id="rule-form"> <div class="form-group"> <label for="rule-name">Rule Name</label> <input type="text" id="rule-name" placeholder="Enter rule name"> </div> <div class="form-group"> <label for="trigger">Trigger</label> <select id="trigger"> <option value="task_created">Task Created</option> <option value="task_completed">Task Completed</option> <option value="due_date_changed">Due Date Changed</option> <option value="status_changed">Status Changed</option> </select> </div> <div class="form-group"> <label for="condition">Condition</label> <textarea id="condition" placeholder="Enter condition (e.g., priority = 'high')"></textarea> </div> <div class="form-group"> <label for="action">Action</label> <select id="action"> <option value="assign_task">Assign Task</option> <option value="send_notification">Send Notification</option> <option value="update_status">Update Status</option> </select> </div> </form> </div> <div class="modal-footer"> <button class="btn-secondary" onclick="closeCreateRuleModal()">Cancel</button> <button class="btn-primary" onclick="saveRule()">Create Rule</button> </div> </div> </div>
<script src="script.js"></script> <script src="components/automation-rule.js"></script> <script> feather.replace(); function openCreateRuleModal() { document.getElementById('create-rule-modal').classList.remove('hidden'); } function closeCreateRuleModal() { document.getElementById('create-rule-modal').classList.add('hidden'); } function saveRule() { const form = document.getElementById('rule-form'); const formData = new FormData(form); console.log('Saving rule:', Object.fromEntries(formData)); closeCreateRuleModal(); } function applyTemplate(templateName) { console.log('Applying template:', templateName); openCreateRuleModal(); } </script></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252class CustomAutomationRule extends HTMLElement { constructor() { super(); this.name = this.getAttribute('name') || 'Untitled Rule'; this.trigger = this.getAttribute('trigger') || 'task_created'; this.condition = this.getAttribute('condition') || 'true'; this.action = this.getAttribute('action') || 'notify'; this.status = this.getAttribute('status') || 'draft'; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } static get observedAttributes() { return ['name', 'trigger', 'condition', 'action', 'status']; } attributeChangedCallback(name, oldValue, newValue) { if (oldValue !== newValue) { this[name] = newValue; this.render(); } } render() { const statusColors = { 'active': { bg: 'bg-green-100', text: 'text-green-800' }, 'draft': { bg: 'bg-yellow-100', text: 'text-yellow-800' }, 'paused': { bg: 'bg-gray-100', text: 'text-gray-800' }, 'error': { bg: 'bg-red-100', text: 'text-red-800' } }; const colors = statusColors[this.status] || statusColors.draft; const triggerIcons = { 'task_created': 'plus', 'task_completed': 'check-circle', 'due_date_changed': 'calendar', 'status_changed': 'refresh-cw', 'priority_changed': 'flag', 'due_date_passed': 'clock', 'subtask_completed': 'layers' }; const actionIcons = { 'assign_task': 'user', 'send_notification': 'bell', 'update_status': 'edit-3' }; const icon = triggerIcons[this.trigger] || 'settings'; const actionIcon = actionIcons[this.action] || 'play'; this.shadowRoot.innerHTML = ` <style> :host { display: block; font-family: system-ui, -apple-system, sans-serif; } .rule-card { background: white; border-radius: 0.75rem; border: 1px solid #e5e7eb; padding: 1.5rem; transition: all 0.2s ease; cursor: pointer; height: 100%; } .rule-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } .rule-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; } .rule-icon { width: 3rem; height: 3rem; border-radius: 0.75rem; background: #f3f4f6; display: flex; align-items: center; justify-content: center; } .rule-name { font-size: 1.125rem; font-weight: 600; color: #111827; } .rule-status { font-size: 0.75rem; padding: 0.25rem 0.75rem; border-radius: 9999px; font-weight: 500; } .rule-details { margin-top: 1rem; } .rule-section { margin-bottom: 1rem; } .rule-label { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; } .rule-value { font-size: 0.875rem; color: #111827; font-weight: 500; } .rule-actions { display: flex; gap: 0.5rem; margin-top: 1rem; } .action-btn { padding: 0.5rem 1rem; border-radius: 0.375rem; font-size: 0.875rem; font-weight: 500; transition: all 0.2s ease; } .action-btn.primary { background: #ef4444; color: white; } .action-btn.secondary { background: #f3f4f6; color: #374151; } .action-btn:hover { opacity: 0.9; } </style> <div class="rule-card"> <div class="rule-header"> <div class="rule-icon"> <i data-feather="${icon}" class="w-6 h-6 text-gray-600"></i> </div> <div> <h3 class="rule-name">${this.name}</h3> <span class="rule-status ${colors.bg} ${colors.text}">${this.status}</span> </div> <div class="rule-details"> <div class="rule-section"> <span class="rule-label">Trigger</span> <p class="rule-value">${this.formatTrigger(this.trigger)}</p> </div> <div class="rule-section"> <span class="rule-label">Condition</span> <p class="rule-value">${this.condition}</p> </div> <div class="rule-section"> <span class="rule-label">Action</span> <p class="rule-value">${this.formatAction(this.action)}</p> </div> </div> <div class="rule-actions"> <button class="action-btn primary" onclick="this.getRootNode().host.toggleRule()"> ${this.status === 'active' ? 'Pause' : 'Activate'} </button> <button class="action-btn secondary" onclick="this.getRootNode().host.editRule()"> Edit </button> </div> </div> </div> `; setTimeout(() => { feather.replace(); const card = this.shadowRoot.querySelector('.rule-card'); if (card) { card.addEventListener('click', (e) => { if (!e.target.closest('.action-btn')) { this.viewRuleDetails(); } }); } }, 100); } formatTrigger(trigger) { const triggerMap = { 'task_created': 'Task Created', 'task_completed': 'Task Completed', 'due_date_changed': 'Due Date Changed', 'status_changed': 'Status Changed', 'priority_changed': 'Priority Changed', 'due_date_passed': 'Due Date Passed', 'subtask_completed': 'Subtask Completed' }; return triggerMap[trigger] || trigger; } formatAction(action) { const actionMap = { 'assign_task': 'Assign Task', 'send_notification': 'Send Notification', 'update_status': 'Update Status', 'assign_to_team_lead': 'Assign to Team Lead', 'complete_parent_task': 'Complete Parent Task' }; return actionMap[action] || action; } toggleRule() { this.status = this.status === 'active' ? 'paused' : 'active'; this.setAttribute('status', this.status); console.log(`Rule ${this.name} ${this.status === 'active' ? 'activated' : 'paused'}`); } editRule() { console.log(`Editing rule: ${this.name}`); window.location.href = `rule-editor.html?id=${encodeURIComponent(this.name)}`; } viewRuleDetails() { console.log(`Viewing rule details: ${this.name}`); window.location.href = `rule-detail.html?id=${encodeURIComponent(this.name)}`; }}
customElements.define('custom-automation-rule', CustomAutomationRule);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194class CustomInboxItem extends HTMLElement { constructor() { super(); this.type = this.getAttribute('type') || 'comment'; this.sender = this.getAttribute('sender') || 'Unknown'; this.message = this.getAttribute('message') || 'No message'; this.time = this.getAttribute('time') || 'Unknown time'; this.unread = this.getAttribute('unread') === 'true'; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } static get observedAttributes() { return ['type', 'sender', 'message', 'time', 'unread']; } attributeChangedCallback(name, oldValue, newValue) { if (oldValue !== newValue) { if (name === 'unread') { this.unread = newValue === 'true'; } else { this[name] = newValue; } this.render(); } } render() { const typeColors = { 'mention': { bg: 'bg-blue-100', text: 'text-blue-800', icon: 'at-sign' }, 'comment': { bg: 'bg-green-100', text: 'text-green-800', icon: 'message-square' }, 'status_update': { bg: 'bg-purple-100', text: 'text-purple-800', icon: 'refresh-cw' } }; const colors = typeColors[this.type] || typeColors.comment; this.shadowRoot.innerHTML = ` <style> :host { display: block; font-family: system-ui, -apple-system, sans-serif; } .inbox-item { background: white; border-radius: 0.75rem; border: 1px solid #e5e7eb; padding: 1.5rem; transition: all 0.2s ease; cursor: pointer; } .inbox-item:hover { border-color: #d1d5db; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); } .inbox-item.unread { border-left: 4px solid #ef4444; } .item-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; } .sender-avatar { width: 3rem; height: 3rem; border-radius: 50%; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-weight: 600; } .item-type { font-size: 0.75rem; padding: 0.25rem 0.75rem; border-radius: 9999px; font-weight: 500; } .item-message { color: #111827; font-weight: 500; } .item-time { font-size: 0.875rem; color: #6b7280; } .item-actions { display: flex; gap: 0.5rem; margin-top: 1rem; } .action-btn { padding: 0.5rem 1rem; border-radius: 0.375rem; font-size: 0.875rem; font-weight: 500; transition: all 0.2s ease; } .action-btn.primary { background: #ef4444; color: white; } .action-btn:hover { opacity: 0.9; } </style> <div class="inbox-item ${this.unread ? 'unread' : ''}"> <div class="item-header"> <div class="sender-avatar ${colors.bg} ${colors.text}"> <i data-feather="${colors.icon}" class="w-6 h-6"></i> </div> <div class="item-type ${colors.bg} ${colors.text}"> ${this.formatType(this.type)} </div> <div class="item-message"> ${this.message} </div> <div class="item-time"> ${this.time} </div> <div class="item-actions"> <button class="action-btn primary" onclick="this.getRootNode().host.markAsRead()"> Mark Read </button> <button class="action-btn" onclick="this.getRootNode().host.reply()"> Reply </button> </div> </div> </div> `; setTimeout(() => { feather.replace(); const item = this.shadowRoot.querySelector('.inbox-item'); if (item) { item.addEventListener('click', (e) => { if (!e.target.closest('.action-btn')) { this.viewFullMessage(); } }); } }, 100); } formatType(type) { const typeMap = { 'mention': 'Mention', 'comment': 'Comment', 'status_update': 'Status Update' }; return typeMap[type] || type; } markAsRead() { this.unread = false; this.setAttribute('unread', 'false'); console.log(`Marked message from ${this.sender} as read`); } reply() { console.log(`Replying to message from ${this.sender}`); // In a real app, this would open a reply modal } viewFullMessage() { console.log(`Viewing full message from ${this.sender}`); window.location.href = `message-detail.html?id=${encodeURIComponent(this.sender)}`; }}
customElements.define('custom-inbox-item', CustomInboxItem);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261class CustomNavbar extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = ` <style> :host { display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 50; font-family: system-ui, -apple-system, sans-serif; } nav { background: white; border-bottom: 1px solid #e5e7eb; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); } .container { max-width: 100%; margin: 0 auto; padding: 0 1rem; } .mobile-menu-btn { display: block; } @media (min-width: 768px) { .mobile-menu-btn { display: none; } } .search-input { width: 100%; max-width: 400px; } .avatar { background-color: #f3f4f6; } .notification-dot { top: -0.125rem; right: -0.125rem; } .dropdown { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); min-width: 200px; } .dropdown-item:hover { background-color: #f9fafb; } .notification-panel { max-height: 400px; overflow-y: auto; } .notification-item:hover { background-color: #f9fafb; } .notification-unread { background-color: #fef2f2; } </style> <nav class="h-16"> <div class="container h-full flex items-center justify-between"> <!-- Left side: Logo and mobile menu --> <div class="flex items-center gap-4"> <button class="mobile-menu-btn p-2 rounded-lg hover:bg-gray-100"> <i data-feather="menu" class="w-5 h-5 text-gray-600"></i> </button> <a href="index.html" class="flex items-center gap-2"> <div class="w-8 h-8 rounded-lg bg-primary-600 flex items-center justify-center"> <i data-feather="check-square" class="w-5 h-5 text-white"></i> </div> <span class="text-xl font-bold text-gray-900 hidden md:block">WorkflowWizard Pro</span></a> </div> <!-- Center: Search --> <div class="flex-1 max-w-2xl mx-4 hidden md:block"> <div class="relative"> <i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"></i> <input type="text" placeholder="Search projects, tasks, or people..." class="search-input pl-10 pr-4 py-2 bg-gray-50 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent" > </div> </div> <!-- Right side: User actions --> <div class="flex items-center gap-3"> <!-- Mobile search --> <button class="md:hidden p-2 rounded-lg hover:bg-gray-100"> <i data-feather="search" class="w-5 h-5 text-gray-600"></i> </button> <!-- Notifications --> <div class="relative"> <button class="notification-btn p-2 rounded-lg hover:bg-gray-100 relative"> <i data-feather="bell" class="w-5 h-5 text-gray-600"></i> <span class="notification-dot absolute w-2 h-2 bg-primary-600 rounded-full"></span> </button> <!-- Notification dropdown --> <div class="notification-dropdown absolute right-0 mt-2 w-80 bg-white rounded-lg border border-gray-200 hidden"> <div class="p-4 border-b border-gray-100"> <h3 class="font-semibold text-gray-900">Notifications</h3> </div> <div class="notification-panel p-2"> <div class="notification-item notification-unread p-3 rounded-lg cursor-pointer"> <div class="flex items-start gap-3"> <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center"> <i data-feather="user" class="w-4 h-4 text-blue-600"></i> </div> <div class="flex-1"> <p class="text-sm text-gray-900">Sarah assigned you a task</p> <p class="text-xs text-gray-500 mt-1">Just now</p> </div> </div> </div> <div class="notification-item p-3 rounded-lg cursor-pointer"> <div class="flex items-start gap-3"> <div class="w-8 h-8 rounded-full bg-green-100 flex items-center justify-center"> <i data-feather="check-circle" class="w-4 h-4 text-green-600"></i> </div> <div class="flex-1"> <p class="text-sm text-gray-900">Task completed: Review designs</p> <p class="text-xs text-gray-500 mt-1">2 hours ago</p> </div> </div> </div> </div> </div> </div> <!-- Quick Add --> <button class="hidden md:flex items-center gap-2 px-4 py-2 bg-primary-600 hover:bg-primary-700 text-white rounded-lg transition-colors"> <i data-feather="plus" class="w-4 h-4"></i> <span>Quick Add</span> </button> <!-- User profile --> <div class="relative"> <button class="user-profile-btn flex items-center gap-2 p-2 rounded-lg hover:bg-gray-100"> <div class="w-8 h-8 rounded-full bg-primary-100 flex items-center justify-center"> <span class="text-sm font-medium text-primary-600">AJ</span> </div> <i data-feather="chevron-down" class="w-4 h-4 text-gray-600"></i> </button> <!-- Profile dropdown --> <div class="profile-dropdown absolute right-0 mt-2 bg-white rounded-lg border border-gray-200 hidden dropdown"> <div class="p-4 border-b border-gray-100"> <div class="flex items-center gap-3"> <div class="w-10 h-10 rounded-full bg-primary-100 flex items-center justify-center"> <span class="text-sm font-medium text-primary-600">AJ</span> </div> <div> <p class="font-medium text-gray-900">Alex Johnson</p> <p class="text-sm text-gray-500">alex@example.com</p> </div> </div> </div> <div class="p-2"> <a href="profile.html" class="dropdown-item flex items-center gap-2 px-4 py-2 rounded-lg hover:bg-gray-50 text-gray-700 no-underline"> <i data-feather="user" class="w-4 h-4"></i> <span>Profile</span> </a> <a href="settings.html" class="dropdown-item flex items-center gap-2 px-4 py-2 rounded-lg hover:bg-gray-50 text-gray-700 no-underline"> <i data-feather="settings" class="w-4 h-4"></i> <span>Settings</span> </a> <div class="border-t border-gray-100 my-2"></div> <button class="logout-btn w-full flex items-center gap-2 px-4 py-2 rounded-lg hover:bg-gray-50 text-red-600"> <i data-feather="log-out" class="w-4 h-4"></i> <span>Sign out</span> </button> </div> </div> </div> </div> </div> </nav> `; this.addEventListeners(); } addEventListeners() { setTimeout(() => { feather.replace(); // Mobile menu toggle const mobileMenuBtn = this.shadowRoot.querySelector('.mobile-menu-btn'); const sidebar = document.querySelector('custom-sidebar'); if (mobileMenuBtn && sidebar) { mobileMenuBtn.addEventListener('click', () => { sidebar.toggleMobileMenu(); }); } // Notification dropdown const notificationBtn = this.shadowRoot.querySelector('.notification-btn'); const notificationDropdown = this.shadowRoot.querySelector('.notification-dropdown'); if (notificationBtn && notificationDropdown) { notificationBtn.addEventListener('click', (e) => { e.stopPropagation(); notificationDropdown.classList.toggle('hidden'); }); // Close when clicking outside document.addEventListener('click', () => { notificationDropdown.classList.add('hidden'); }); } // User profile dropdown const profileBtn = this.shadowRoot.querySelector('.user-profile-btn'); const profileDropdown = this.shadowRoot.querySelector('.profile-dropdown'); if (profileBtn && profileDropdown) { profileBtn.addEventListener('click', (e) => { e.stopPropagation(); profileDropdown.classList.toggle('hidden'); }); // Close when clicking outside document.addEventListener('click', () => { profileDropdown.classList.add('hidden'); }); } // Logout button const logoutBtn = this.shadowRoot.querySelector('.logout-btn'); if (logoutBtn) { logoutBtn.addEventListener('click', () => { if (confirm('Are you sure you want to sign out?')) { window.location.href = 'login.html'; } }); } }, 100); }}
customElements.define('custom-navbar', CustomNavbar);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267class CustomProjectCard extends HTMLElement { constructor() { super(); this.title = this.getAttribute('title') || 'Untitled Project'; this.progress = parseInt(this.getAttribute('progress')) || 0; this.dueDate = this.getAttribute('due-date') || ''; this.members = parseInt(this.getAttribute('members')) || 0; this.tasks = parseInt(this.getAttribute('tasks')) || 0; this.color = this.getAttribute('color') || 'primary'; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } static get observedAttributes() { return ['title', 'progress', 'due-date', 'members', 'tasks', 'color']; } attributeChangedCallback(name, oldValue, newValue) { if (oldValue !== newValue) { if (name === 'progress') { this.progress = parseInt(newValue); } else if (name === 'members' || name === 'tasks') { this[name] = parseInt(newValue); } else { this[name] = newValue; } this.render(); } } render() { const colorClass = this.color === 'primary' ? 'primary' : this.color; const colorMap = { 'primary': { bg: 'bg-primary-100', text: 'text-primary-800', progress: 'bg-primary-600' }, 'blue': { bg: 'bg-blue-100', text: 'text-blue-800', progress: 'bg-blue-600' }, 'green': { bg: 'bg-green-100', text: 'text-green-800', progress: 'bg-green-600' }, 'purple': { bg: 'bg-purple-100', text: 'text-purple-800', progress: 'bg-purple-600' }, 'yellow': { bg: 'bg-yellow-100', text: 'text-yellow-800', progress: 'bg-yellow-600' } }; const colors = colorMap[colorClass] || colorMap.primary; const formattedDate = this.dueDate ? Utils.formatDate(this.dueDate) : 'No due date'; const relativeDate = this.dueDate ? Utils.formatRelativeDate(this.dueDate) : ''; this.shadowRoot.innerHTML = ` <style> :host { display: block; font-family: system-ui, -apple-system, sans-serif; } .project-card { background: white; border-radius: 0.75rem; border: 1px solid #e5e7eb; overflow: hidden; transition: all 0.2s ease; cursor: pointer; height: 100%; } .project-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } .project-header { padding: 1.5rem; border-bottom: 1px solid #f3f4f6; } .project-icon { width: 3rem; height: 3rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; } .project-title { font-size: 1.125rem; font-weight: 600; color: #111827; margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .project-due { font-size: 0.875rem; color: #6b7280; display: flex; align-items: center; gap: 0.375rem; } .project-body { padding: 1.5rem; } .progress-container { margin-bottom: 1.5rem; } .progress-info { display: flex; justify-content: space-between; margin-bottom: 0.5rem; } .progress-percent { font-size: 0.875rem; font-weight: 600; color: #374151; } .progress-label { font-size: 0.75rem; color: #6b7280; } .progress-bar { height: 0.5rem; background-color: #f3f4f6; border-radius: 9999px; overflow: hidden; } .progress-fill { height: 100%; border-radius: 9999px; transition: width 0.6s ease; } .stats { display: flex; justify-content: space-between; align-items: center; } .stat { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; } .stat-value { font-size: 1.125rem; font-weight: 700; color: #111827; } .stat-label { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; } .stat-icon { width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background-color: #f9fafb; } .stat-icon i { width: 1rem; height: 1rem; } .divider { width: 1px; height: 2rem; background-color: #e5e7eb; } </style> <div class="project-card hover-lift"> <div class="project-header"> <div class="project-icon ${colors.bg}"> <i data-feather="folder" class="${colors.text} w-6 h-6"></i> </div> <h3 class="project-title">${this.title}</h3> <div class="project-due"> <i data-feather="calendar" class="w-4 h-4"></i> <span>Due ${formattedDate} • ${relativeDate}</span> </div> </div> <div class="project-body"> <div class="progress-container"> <div class="progress-info"> <span class="progress-percent">${this.progress}%</span> <span class="progress-label">Complete</span> </div> <div class="progress-bar"> <div class="progress-fill ${colors.progress}" style="width: ${this.progress}%"></div> </div> </div> <div class="stats"> <div class="stat"> <div class="stat-icon"> <i data-feather="users" class="text-gray-600"></i> </div> <span class="stat-value">${this.members}</span> <span class="stat-label">Members</span> </div> <div class="divider"></div> <div class="stat"> <div class="stat-icon"> <i data-feather="check-square" class="text-gray-600"></i> </div> <span class="stat-value">${this.tasks}</span> <span class="stat-label">Tasks</span> </div> <div class="divider"></div> <div class="stat"> <div class="stat-icon"> <i data-feather="activity" class="${colors.text}"></i> </div> <span class="stat-value">${this.getPriority()}</span> <span class="stat-label">Priority</span> </div> </div> </div> </div> `; setTimeout(() => { feather.replace(); // Add click handler const card = this.shadowRoot.querySelector('.project-card'); if (card) { card.addEventListener('click', () => { window.location.href = `project-detail.html?id=${encodeURIComponent(this.title.toLowerCase().replace(/\s+/g, '-'))}`; }); } }, 100); } getPriority() { if (this.progress >= 75) return 'Low'; if (this.progress >= 50) return 'Med'; if (this.progress >= 25) return 'High'; return 'Urgent'; }}
customElements.define('custom-project-card', CustomProjectCard);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168class CustomReportCard extends HTMLElement { constructor() { super(); this.title = this.getAttribute('title') || 'Report'; this.type = this.getAttribute('type') || 'bar'; this.value = parseInt(this.getAttribute('value')) || 0; this.trend = this.getAttribute('trend') || 'neutral'; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } static get observedAttributes() { return ['title', 'type', 'value', 'trend']; } attributeChangedCallback(name, oldValue, newValue) { if (oldValue !== newValue) { if (name === 'value') { this.value = parseInt(newValue); } else { this[name] = newValue; } this.render(); } } render() { const trendColors = { 'up': { bg: 'bg-green-100', text: 'text-green-800', icon: 'trending-up' }, 'down': { bg: 'bg-red-100', text: 'text-red-800', icon: 'trending-down' }, 'neutral': { bg: 'bg-gray-100', text: 'text-gray-800', icon: 'minus' } }; const colors = trendColors[this.trend] || trendColors.neutral; const chartIcons = { 'gauge': 'activity', 'bar': 'bar-chart-2', 'pie': 'pie-chart' }; const icon = chartIcons[this.type] || 'bar-chart-2'; this.shadowRoot.innerHTML = ` <style> :host { display: block; font-family: system-ui, -apple-system, sans-serif; } .report-card { background: white; border-radius: 0.75rem; border: 1px solid #e5e7eb; padding: 1.5rem; transition: all 0.2s ease; height: 100%; } .report-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } .report-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; } .report-title { font-size: 1.125rem; font-weight: 600; color: #111827; } .report-chart { height: 200px; background: #f8fafc; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; } .report-stats { display: flex; align-items: center; gap: 1rem; } .report-value { font-size: 2.25rem; font-weight: 700; color: #111827; } .report-trend { display: flex; align-items: center; gap: 0.5rem; } .report-actions { display: flex; gap: 0.5rem; margin-top: 1rem; } .action-btn { padding: 0.5rem 1rem; border-radius: 0.375rem; font-size: 0.875rem; font-weight: 500; transition: all 0.2s ease; } .action-btn.primary { background: #ef4444; color: white; } .action-btn:hover { opacity: 0.9; } </style> <div class="report-card"> <div class="report-header"> <h3 class="report-title">${this.title}</h3> <div class="report-trend ${colors.bg} ${colors.text}"> <i data-feather="${colors.icon}" class="w-4 h-4"></i> </div> </div> <div class="report-chart"> <i data-feather="${icon}" class="w-16 h-16 text-gray-400"></i> </div> <div class="report-stats"> <span class="report-value">${this.value}%</span> </div> <div class="report-actions"> <button class="action-btn primary" onclick="this.getRootNode().host.viewDetails()"> View Details </button> </div> </div> </div> `; setTimeout(() => { feather.replace(); }, 100); } viewDetails() { console.log(`Viewing detailed report for: ${this.title}`); window.location.href = `report-detail.html?id=${encodeURIComponent(this.title)}`; }}
customElements.define('custom-report-card', CustomReportCard);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336class CustomSidebar extends HTMLElement { constructor() { super(); this.activePage = this.getAttribute('active-page') || 'dashboard'; this.isMobileMenuOpen = false; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); this.addEventListeners(); } static get observedAttributes() { return ['active-page']; } attributeChangedCallback(name, oldValue, newValue) { if (name === 'active-page' && oldValue !== newValue) { this.activePage = newValue; this.render(); } } render() { this.shadowRoot.innerHTML = ` <style> :host { display: block; font-family: system-ui, -apple-system, sans-serif; } aside { width: 16rem; background: white; border-right: 1px solid #e5e7eb; height: calc(100vh - 4rem); position: fixed; left: 0; top: 4rem; transform: translateX(0); transition: transform 0.3s ease; z-index: 40; } @media (max-width: 768px) { aside { transform: translateX(-100%); } aside.mobile-open { transform: translateX(0); box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1); } .overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 35; } .overlay.active { display: block; } } .nav-item { padding: 0.75rem 1rem; border-radius: 0.5rem; color: #6b7280; text-decoration: none; display: flex; align-items: center; gap: 0.75rem; transition: all 0.2s ease; margin: 0.125rem 0.5rem; } .nav-item:hover { background: #f9fafb; color: #374151; } .nav-item.active { background: #fef2f2; color: #dc2626; font-weight: 500; } .nav-item.active i { color: #dc2626; } .nav-item i { width: 1.25rem; height: 1.25rem; } .team-member { width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 2px solid white; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 500; } .team-member.avatar-1 { background: #fbb6ce; } .team-member.avatar-2 { background: #c6f6d5; } .team-member.avatar-3 { background: #fed7d7; } .team-member.avatar-4 { background: #e9d8fd; } .team-member.avatar-5 { background: #bee3f8; } .section-title { color: #9ca3af; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin: 1.5rem 0 0.5rem 0; } .workspace-stats { background: #f9fafb; border-radius: 0.5rem; padding: 1rem; margin-top: auto; } .progress-bar { height: 0.375rem; background: #e5e7eb; border-radius: 9999px; overflow: hidden; } .progress-fill { height: 100%; background: #10b981; border-radius: 9999px; transition: width 0.3s ease; } </style> <div class="overlay" id="sidebar-overlay"></div> <aside id="sidebar" class="flex flex-col"> <!-- Navigation --> <div class="flex-1 p-4 overflow-y-auto"> <nav class="space-y-1"> <a href="index.html" class="nav-item ${this.activePage === 'dashboard' ? 'active' : ''}"> <i data-feather="layout"></i> <span>Dashboard</span> </a> <a href="projects.html" class="nav-item ${this.activePage === 'projects' ? 'active' : ''}"> <i data-feather="folder"></i> <span>Projects</span> </a> <a href="tasks.html" class="nav-item ${this.activePage === 'tasks' ? 'active' : ''}"> <i data-feather="check-circle"></i> <span>My Tasks</span> </a> <a href="board.html" class="nav-item ${this.activePage === 'board' ? 'active' : ''}"> <i data-feather="columns"></i> <span>Board View</span> </a> <a href="calendar.html" class="nav-item ${this.activePage === 'calendar' ? 'active' : ''}"> <i data-feather="calendar"></i> <span>Calendar</span> </a> <a href="timeline.html" class="nav-item ${this.activePage === 'timeline' ? 'active' : ''}"> <i data-feather="bar-chart-2"></i> <span>Timeline</span> </a> <a href="automation.html" class="nav-item ${this.activePage === 'automation' ? 'active' : ''}"> <i data-feather="zap"></i> <span>Automation</span> </a> <a href="inbox.html" class="nav-item ${this.activePage === 'inbox' ? 'active' : ''}"> <i data-feather="inbox"></i> <span>Inbox</span> </a> <a href="reporting.html" class="nav-item ${this.activePage === 'reporting' ? 'active' : ''}"> <i data-feather="bar-chart"></i> <span>Reporting</span> </a></nav> <div class="section-title px-4 mt-8">Teams</div> <nav class="space-y-1 mt-2"> <a href="team-design.html" class="nav-item"> <div class="team-member avatar-1">D</div> <span>Design Team</span> <span class="ml-auto text-xs px-2 py-1 bg-blue-100 text-blue-800 rounded-full">12</span> </a> <a href="team-dev.html" class="nav-item"> <div class="team-member avatar-2">DV</div> <span>Development</span> <span class="ml-auto text-xs px-2 py-1 bg-green-100 text-green-800 rounded-full">8</span> </a> <a href="team-marketing.html" class="nav-item"> <div class="team-member avatar-3">M</div> <span>Marketing</span> <span class="ml-auto text-xs px-2 py-1 bg-purple-100 text-purple-800 rounded-full">15</span> </a> </nav> <div class="section-title px-4 mt-8">Views</div> <div class="flex flex-wrap gap-2 p-4"> <button class="px-3 py-1.5 text-sm rounded-lg bg-primary-100 text-primary-800 font-medium"> List </button> <button class="px-3 py-1.5 text-sm rounded-lg bg-gray-100 text-gray-700 hover:bg-gray-200"> Board </button> <button class="px-3 py-1.5 text-sm rounded-lg bg-gray-100 text-gray-700 hover:bg-gray-200"> Calendar </button> <button class="px-3 py-1.5 text-sm rounded-lg bg-gray-100 text-gray-700 hover:bg-gray-200"> Timeline </button> </div> </div> <!-- Workspace Stats --> <div class="workspace-stats mx-4 mb-4"> <div class="flex items-center justify-between mb-2"> <span class="text-sm font-medium text-gray-700">Workspace Usage</span> <span class="text-sm font-semibold text-gray-900">75%</span> </div> <div class="progress-bar"> <div class="progress-fill" style="width: 75%"></div> </div> <p class="text-xs text-gray-500 mt-2">12 of 16 projects in use</p> </div> <!-- Team Members --> <div class="px-4 pb-4"> <p class="text-sm font-medium text-gray-700 mb-3">Team Online</p> <div class="flex -space-x-2"> <div class="team-member avatar-1" title="Designer">D</div> <div class="team-member avatar-2" title="Developer">DV</div> <div class="team-member avatar-3" title="Marketing">M</div> <div class="team-member avatar-4" title="PM">PM</div> <div class="team-member avatar-5" title="QA">QA</div> <div class="team-member bg-gray-200 text-gray-700" title="+2">+2</div> </div> </div> </aside> `; setTimeout(() => { feather.replace(); }, 100); } addEventListeners() { setTimeout(() => { // Close sidebar when clicking on overlay (mobile) const overlay = this.shadowRoot.getElementById('sidebar-overlay'); if (overlay) { overlay.addEventListener('click', () => { this.closeMobileMenu(); }); } // Add click handlers for view buttons const viewButtons = this.shadowRoot.querySelectorAll('button'); viewButtons.forEach(button => { button.addEventListener('click', () => { if (button.textContent === 'List') { window.location.href = 'tasks.html?view=list'; } else if (button.textContent === 'Board') { window.location.href = 'board.html'; } else if (button.textContent === 'Calendar') { window.location.href = 'calendar.html'; } else if (button.textContent === 'Timeline') { window.location.href = 'timeline.html'; } }); }); }, 100); } toggleMobileMenu() { this.isMobileMenuOpen = !this.isMobileMenuOpen; const sidebar = this.shadowRoot.getElementById('sidebar'); const overlay = this.shadowRoot.getElementById('sidebar-overlay'); if (sidebar) { sidebar.classList.toggle('mobile-open', this.isMobileMenuOpen); } if (overlay) { overlay.classList.toggle('active', this.isMobileMenuOpen); } // Prevent body scroll when menu is open document.body.style.overflow = this.isMobileMenuOpen ? 'hidden' : 'auto'; } closeMobileMenu() { this.isMobileMenuOpen = false; const sidebar = this.shadowRoot.getElementById('sidebar'); const overlay = this.shadowRoot.getElementById('sidebar-overlay'); if (sidebar) { sidebar.classList.remove('mobile-open'); } if (overlay) { overlay.classList.remove('active'); } document.body.style.overflow = 'auto'; }}
customElements.define('custom-sidebar', CustomSidebar);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390class CustomTaskItem extends HTMLElement { constructor() { super(); this.title = this.getAttribute('title') || 'Untitled Task'; this.project = this.getAttribute('project') || 'No Project'; this.dueDate = this.getAttribute('due-date') || ''; this.priority = this.getAttribute('priority') || 'medium'; this.assignee = this.getAttribute('assignee') || 'unassigned'; this.completed = this.getAttribute('completed') === 'true'; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } static get observedAttributes() { return ['title', 'project', 'due-date', 'priority', 'assignee', 'completed']; } attributeChangedCallback(name, oldValue, newValue) { if (oldValue !== newValue) { if (name === 'completed') { this.completed = newValue === 'true'; } else { this[name] = newValue; } this.render(); } } render() { const priorityColors = { 'high': { bg: 'bg-red-100', text: 'text-red-800', border: 'border-red-200' }, 'medium': { bg: 'bg-yellow-100', text: 'text-yellow-800', border: 'border-yellow-200' }, 'low': { bg: 'bg-green-100', text: 'text-green-800', border: 'border-green-200' } }; const priorityLabels = { 'high': 'High', 'medium': 'Medium', 'low': 'Low' }; const colors = priorityColors[this.priority] || priorityColors.medium; const formattedDate = this.dueDate ? Utils.formatDate(this.dueDate) : 'No due date'; const isOverdue = this.dueDate && new Date(this.dueDate) < new Date() && !this.completed; const assigneeInitials = this.getAssigneeInitials(); const assigneeColor = this.getAssigneeColor(); this.shadowRoot.innerHTML = ` <style> :host { display: block; font-family: system-ui, -apple-system, sans-serif; } .task-item { background: white; border-radius: 0.75rem; border: 1px solid #e5e7eb; padding: 1.25rem; position: relative; transition: all 0.2s ease; } .task-item:hover { border-color: #d1d5db; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); } .task-item.completed { opacity: 0.7; background: #f9fafb; } .task-item.completed .task-title { text-decoration: line-through; color: #9ca3af; } .task-checkbox { width: 1.25rem; height: 1.25rem; border-radius: 0.375rem; border: 2px solid #d1d5db; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; } .task-checkbox:hover { border-color: #9ca3af; } .task-checkbox.checked { background-color: #10b981; border-color: #10b981; } .task-checkbox.checked i { color: white; display: block; } .task-checkbox i { display: none; width: 0.875rem; height: 0.875rem; } .task-content { flex: 1; min-width: 0; } .task-title { font-weight: 500; color: #111827; margin-bottom: 0.375rem; display: flex; align-items: center; gap: 0.5rem; } .task-project { font-size: 0.875rem; color: #6b7280; display: flex; align-items: center; gap: 0.375rem; } .task-meta { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; flex-wrap: wrap; } .task-priority { font-size: 0.75rem; padding: 0.25rem 0.625rem; border-radius: 9999px; font-weight: 500; display: inline-flex; align-items: center; gap: 0.25rem; } .task-due { font-size: 0.875rem; color: #6b7280; display: flex; align-items: center; gap: 0.375rem; } .task-due.overdue { color: #ef4444; font-weight: 500; } .task-assignee { width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; color: white; margin-left: auto; } .task-actions { display: flex; gap: 0.5rem; margin-left: 1rem; } .task-action-btn { width: 2rem; height: 2rem; border-radius: 0.375rem; display: flex; align-items: center; justify-content: center; color: #6b7280; cursor: pointer; transition: all 0.2s ease; } .task-action-btn:hover { background-color: #f3f4f6; color: #374151; } @media (max-width: 640px) { .task-item { padding: 1rem; } .task-meta { gap: 0.75rem; } .task-actions { margin-left: 0.5rem; } } </style> <div class="task-item ${this.completed ? 'completed' : ''} ${'priority-' + this.priority}"> <div class="flex items-start gap-4"> <div class="task-checkbox ${this.completed ? 'checked' : ''}" data-task-toggle> <i data-feather="check" class="w-3.5 h-3.5"></i> </div> <div class="task-content"> <div class="task-title"> <span>${this.title}</span> ${this.hasSubtasks() ? ` <span class="text-xs px-1.5 py-0.5 bg-gray-100 text-gray-600 rounded">${this.getSubtaskCount()} subtasks</span> ` : ''} <div class="flex gap-1 ml-auto"> <span class="text-xs px-1.5 py-0.5 ${colors.bg} ${colors.text} rounded">${priorityLabels[this.priority]}</span> </div><div class="task-project"> <i data-feather="folder" class="w-3.5 h-3.5"></i> <span>${this.project}</span> </div> <div class="task-meta"> <span class="task-priority ${colors.bg} ${colors.text} ${colors.border}"> <i data-feather="flag" class="w-3 h-3"></i> ${priorityLabels[this.priority]} </span> <div class="task-due ${isOverdue ? 'overdue' : ''}"> <i data-feather="calendar" class="w-3.5 h-3.5"></i> <span>${formattedDate}</span> ${isOverdue ? '<span class="ml-1">• Overdue</span>' : ''} </div> </div> </div> <div class="task-assignee" style="background-color: ${assigneeColor}" title="${this.getAssigneeName()}"> ${assigneeInitials} </div> <div class="task-actions"> <div class="task-action-btn" title="Add dependency"> <i data-feather="link"></i> </div> <div class="task-action-btn" title="Add subtask"> <i data-feather="plus-circle"></i> </div> <div class="task-action-btn" title="More options"> <i data-feather="more-vertical"></i> </div> </div> </div> </div> `; setTimeout(() => { feather.replace(); // Add checkbox click handler const checkbox = this.shadowRoot.querySelector('.task-checkbox'); if (checkbox) { checkbox.addEventListener('click', (e) => { e.stopPropagation(); this.toggleCompletion(); }); } // Add click handler for task item const taskItem = this.shadowRoot.querySelector('.task-item'); if (taskItem) { taskItem.addEventListener('click', (e) => { if (!e.target.closest('.task-checkbox') && !e.target.closest('.task-action-btn')) { window.location.href = `task-detail.html?id=${encodeURIComponent(this.title.toLowerCase().replace(/\s+/g, '-'))}`; } }); } // Add action button handlers const actionBtns = this.shadowRoot.querySelectorAll('.task-action-btn'); actionBtns.forEach((btn, index) => { btn.addEventListener('click', (e) => { e.stopPropagation(); this.handleAction(index); }); }); }, 100); } toggleCompletion() { this.completed = !this.completed; this.setAttribute('completed', this.completed); // Dispatch custom event this.dispatchEvent(new CustomEvent('task-toggled', { detail: { taskId: this.getAttribute('data-task-id'), completed: this.completed }, bubbles: true, composed: true })); } getAssigneeInitials() { const nameMap = { 'alex': 'AJ', 'sarah': 'SC', 'mike': 'MD', 'jane': 'JD', 'tom': 'TB' }; return nameMap[this.assignee] || this.assignee.slice(0, 2).toUpperCase(); } getAssigneeName() { const nameMap = { 'alex': 'Alex Johnson', 'sarah': 'Sarah Chen', 'mike': 'Mike Davis', 'jane': 'Jane Doe', 'tom': 'Tom Brown' }; return nameMap[this.assignee] || this.assignee; } getAssigneeColor() { const colors = ['#ef4444', '#3b82f6', '#10b981', '#8b5cf6', '#f59e0b', '#ec4899']; const index = ['alex', 'sarah', 'mike', 'jane', 'tom'].indexOf(this.assignee); return index >= 0 ? colors[index] : colors[Math.floor(Math.random() * colors.length)]; } hasSubtasks() { // In a real app, this would check actual subtask data return Math.random() > 0.5; } getSubtaskCount() { return Math.floor(Math.random() * 5) + 1; } handleAction(index) { const actions = ['dependency', 'subtask', 'more']; const action = actions[index]; switch(action) { case 'dependency': this.showDependencyModal(); break; case 'subtask': this.showSubtaskModal(); break; case 'more': this.showMoreOptions(); break; } } showDependencyModal() { console.log('Show dependency modal for task:', this.title); // In a real app, this would open a modal } showSubtaskModal() { console.log('Show subtask modal for task:', this.title); // In a real app, this would open a modal } showMoreOptions() { console.log('Show more options for task:', this.title); // In a real app, this would show a dropdown menu }}
customElements.define('custom-task-item', CustomTaskItem);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>WorkflowWizard Pro - Inbox</title> <link rel="icon" type="image/x-icon" href="favicon.ico"> <script src="https://cdn.tailwindcss.com"></script> <script> tailwind.config = { theme: { extend: { colors: { primary: { 50: '#fef2f2', 100: '#fee2e2', 200: '#fecaca', 300: '#fca5a5', 400: '#f87171', 500: '#ef4444', 600: '#dc2626', 700: '#b91c1c', 800: '#991b1b', 900: '#7f1d1d', } } } } } </script> <link rel="stylesheet" href="style.css"> <script src="https://unpkg.com/feather-icons"></script> <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> <script src="components/navbar.js"></script> <script src="components/sidebar.js"></script> <script src="components/inbox-item.js"></script></head><body class="bg-gray-50 min-h-screen"> <custom-navbar></custom-navbar> <div class="flex"> <custom-sidebar active-page="inbox"></custom-sidebar> <main class="flex-1 p-6 md:p-8 ml-0 md:ml-64 mt-16"> <!-- Inbox Header --> <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8"> <div> <h1 class="text-3xl font-bold text-gray-900">Team Inbox 📥</h1> <p class="text-gray-600 mt-2">Manage team communications and updates</p> </div> <div class="flex gap-2 mt-4 md:mt-0"> <button class="bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-lg flex items-center gap-2 transition-colors duration-200 shadow-sm"> <i data-feather="check"></i> Mark All Read </button> </div> </div>
<!-- Inbox Filters --> <div class="flex flex-wrap gap-2 mb-6"> <button class="px-4 py-2 bg-primary-600 text-white rounded-lg"> All </button> <button class="px-4 py-2 bg-gray-100 text-gray-700 hover:bg-gray-200 rounded-lg"> Mentions </button> <button class="px-4 py-2 bg-gray-100 text-gray-700 hover:bg-gray-200 rounded-lg"> Comments </button> </div> </div>
<!-- Inbox Messages --> <div class="space-y-4"> <custom-inbox-item type="mention" sender="Sarah Chen" message="mentioned you in 'Website Redesign'" time="2 hours ago" unread="true"> </custom-inbox-item> <custom-inbox-item type="comment" sender="Mike Davis" message="replied to your comment on 'Q4 Marketing'" time="4 hours ago" unread="true"> </custom-inbox-item> <custom-inbox-item type="status_update" sender="Jane Doe" message="updated status of 'Mobile App' to In Progress" time="1 day ago" unread="false"> </custom-inbox-item> </div> </div> </main> </div>
<script src="script.js"></script> <script src="components/inbox-item.js"></script> <script> feather.replace(); </script></body></html>12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>WorkflowWizard Pro - Dashboard</title><link rel="icon" type="image/x-icon" href="favicon.ico"><script src="https://cdn.tailwindcss.com"></script><script>tailwind.config = {theme: {extend: {colors: {primary: {50: '#fef2f2',100: '#fee2e2',200: '#fecaca',300: '#fca5a5',400: '#f87171',500: '#ef4444',600: '#dc2626',700: '#b91c1c',800: '#991b1b',900: '#7f1d1d',}}}}}</script><link rel="stylesheet" href="style.css"><script src="https://unpkg.com/feather-icons"></script><script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script><script src="components/navbar.js"></script><script src="components/sidebar.js"></script><script src="components/project-card.js"></script><script src="components/task-item.js"></script></head><body class="bg-gray-50 min-h-screen"><custom-navbar></custom-navbar><div class="flex"><custom-sidebar active-page="dashboard"></custom-sidebar><main class="flex-1 p-6 md:p-8 ml-0 md:ml-64 mt-16"><!-- Dashboard Header --><div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8"><div><h1 class="text-3xl font-bold text-gray-900">Welcome back, Alex! 👋</h1><p class="text-gray-600 mt-2">Manage your projects and tasks efficiently</p></div><button class="mt-4 md:mt-0 bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-lg flex items-center gap-2 transition-colors duration-200 shadow-sm"><i data-feather="plus"></i>Create New Project</button></div><!-- Stats Overview --><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"><div class="bg-white rounded-xl p-6 shadow-sm border border-gray-100"><div class="flex items-center justify-between"><div><p class="text-gray-500 text-sm">Active Projects</p><h3 class="text-2xl font-bold text-gray-900 mt-2">12</h3></div><div class="bg-primary-50 p-3 rounded-full"><i data-feather="folder" class="text-primary-600 w-6 h-6"></i></div></div></div><div class="bg-white rounded-xl p-6 shadow-sm border border-gray-100"><div class="flex items-center justify-between"><div><p class="text-gray-500 text-sm">Tasks Due</p><h3 class="text-2xl font-bold text-gray-900 mt-2">8</h3></div><div class="bg-blue-50 p-3 rounded-full"><i data-feather="calendar" class="text-blue-600 w-6 h-6"></i></div></div></div><div class="bg-white rounded-xl p-6 shadow-sm border border-gray-100"><div class="flex items-center justify-between"><div><p class="text-gray-500 text-sm">Completed</p><h3 class="text-2xl font-bold text-gray-900 mt-2">47</h3></div><div class="bg-green-50 p-3 rounded-full"><i data-feather="check-circle" class="text-green-600 w-6 h-6"></i></div></div></div><div class="bg-white rounded-xl p-6 shadow-sm border border-gray-100"><div class="flex items-center justify-between"><div><p class="text-gray-500 text-sm">Team Members</p><h3 class="text-2xl font-bold text-gray-900 mt-2">6</h3></div><div class="bg-purple-50 p-3 rounded-full"><i data-feather="users" class="text-purple-600 w-6 h-6"></i></div></div></div></div><!-- Recent Projects --><div class="mb-8"><div class="flex justify-between items-center mb-6"><h2 class="text-xl font-semibold text-gray-900">Recent Projects</h2><a href="projects.html" class="text-primary-600 hover:text-primary-700 font-medium flex items-center gap-1">View all<i data-feather="chevron-right" class="w-4 h-4"></i></a></div><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"><custom-project-cardtitle="Website Redesign"progress="75"due-date="2024-01-15"members="4"tasks="12"color="primary"></custom-project-card><custom-project-cardtitle="Mobile App Launch"progress="30"due-date="2024-02-20"members="6"tasks="24"color="blue"></custom-project-card><custom-project-cardtitle="Q4 Marketing Campaign"progress="90"due-date="2024-01-10"members="3"tasks="8"color="green"></custom-project-card></div></div><!-- Upcoming Tasks --><div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6"><div class="flex justify-between items-center mb-6"><h2 class="text-xl font-semibold text-gray-900">Upcoming Tasks</h2><a href="tasks.html" class="text-primary-600 hover:text-primary-700 font-medium flex items-center gap-1">View all tasks<i data-feather="chevron-right" class="w-4 h-4"></i></a></div><div class="space-y-4"><custom-task-itemtitle="Review homepage mockups"project="Website Redesign"due-date="2024-01-08"priority="high"assignee="alex"completed="false"></custom-task-item><custom-task-itemtitle="Prepare launch presentation"project="Mobile App Launch"due-date="2024-01-09"priority="medium"assignee="sarah"completed="false"></custom-task-item><custom-task-itemtitle="Finalize budget report"project="Q4 Marketing Campaign"due-date="2024-01-07"priority="low"assignee="mike"completed="false"></custom-task-item></div></div></main></div><script src="script.js"></script><script>feather.replace();</script><script src="https://huggingface.co/deepsite/deepsite-badge.js"></script><script src="https://huggingface.co/deepsite/deepsite-badge.js"></script></body></html>
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>WorkflowWizard Pro - Reporting</title> <link rel="icon" type="image/x-icon" href="favicon.ico"> <script src="https://cdn.tailwindcss.com"></script> <script> tailwind.config = { theme: { extend: { colors: { primary: { 50: '#fef2f2', 100: '#fee2e2', 200: '#fecaca', 300: '#fca5a5', 400: '#f87171', 500: '#ef4444', 600: '#dc2626', 700: '#b91c1c', 800: '#991b1b', 900: '#7f1d1d', } } } } } </script> <link rel="stylesheet" href="style.css"> <script src="https://unpkg.com/feather-icons"></script> <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> <script src="components/navbar.js"></script> <script src="components/sidebar.js"></script> <script src="components/report-card.js"></script></head><body class="bg-gray-50 min-h-screen"> <custom-navbar></custom-navbar> <div class="flex"> <custom-sidebar active-page="reporting"></custom-sidebar> <main class="flex-1 p-6 md:p-8 ml-0 md:ml-64 mt-16"> <!-- Reporting Header --> <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8"> <div> <h1 class="text-3xl font-bold text-gray-900">Advanced Reporting 📊</h1> <p class="text-gray-600 mt-2">Gain insights with comprehensive dashboards and portfolio analytics</p> </div> <button class="mt-4 md:mt-0 bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-lg flex items-center gap-2 transition-colors duration-200 shadow-sm"> <i data-feather="download"></i> Export Report </button> </div>
<!-- Dashboard Widgets --> <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"> <custom-report-card title="Project Health" type="gauge" value="78" trend="up"> </custom-report-card> <custom-report-card title="Team Performance" type="bar" value="92" trend="up"> </custom-report-card> <custom-report-card title="Resource Utilization" type="pie" value="65" trend="down"> </custom-report-card> </div>
<!-- Portfolio Overview --> <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6"> <h2 class="text-xl font-semibold text-gray-900 mb-6">Portfolio Analytics</h2> <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> <div class="text-center p-4 border border-gray-200 rounded-lg"> <i data-feather="pie-chart" class="w-8 h-8 text-purple-600 mx-auto"></i> <p class="text-sm font-medium text-gray-900 mt-2">Strategic Projects</p> <p class="text-2xl font-bold text-gray-900 mt-2">8</p> </div> <div class="text-center p-4 border border-gray-200 rounded-lg"> <i data-feather="trending-up" class="w-8 h-8 text-green-600 mx-auto"></i> <p class="text-sm font-medium text-gray-900 mt-2">Operational Projects</p> <p class="text-2xl font-bold text-gray-900 mt-2">12</p> </div> <div class="text-center p-4 border border-gray-200 rounded-lg"> <i data-feather="target" class="w-8 h-8 text-blue-600 mx-auto"></i> <p class="text-sm font-medium text-gray-900 mt-2">Tactical Projects</p> <p class="text-2xl font-bold text-gray-900 mt-2">6</p> </div> </div> </div> </div> </main> </div>
<script src="script.js"></script> <script> feather.replace(); </script></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311// Main application script for TaskTamer Pro
class TaskTamerApp { constructor() { this.currentView = 'list'; this.init(); }
init() { this.loadProjects(); this.loadTasks(); this.setupEventListeners(); this.setupDragAndDrop(); }
loadProjects() { // In a real app, this would be an API call console.log('Loading projects...'); }
loadTasks() { // In a real app, this would be an API call console.log('Loading tasks...'); }
setupEventListeners() { // View switcher document.addEventListener('click', (e) => { if (e.target.closest('[data-view]')) { const view = e.target.closest('[data-view]').dataset.view; this.switchView(view); } });
// Task completion toggle document.addEventListener('click', (e) => { if (e.target.closest('[data-task-toggle]')) { const taskId = e.target.closest('[data-task-toggle]').dataset.taskToggle; this.toggleTaskCompletion(taskId); } });
// Modal handling document.addEventListener('click', (e) => { if (e.target.closest('[data-modal-open]')) { const modalId = e.target.closest('[data-modal-open]').dataset.modalOpen; this.openModal(modalId); } if (e.target.closest('[data-modal-close]') || e.target.classList.contains('modal-overlay')) { this.closeModal(); } }); }
switchView(view) { this.currentView = view; // Update active view button document.querySelectorAll('[data-view]').forEach(btn => { btn.classList.toggle('active', btn.dataset.view === view); }); // Show/hide view containers document.querySelectorAll('.view-container').forEach(container => { container.classList.toggle('hidden', container.id !== `${view}-view`); }); // Save preference localStorage.setItem('preferredView', view); console.log(`Switched to ${view} view`); }
toggleTaskCompletion(taskId) { const taskElement = document.querySelector(`[data-task-id="${taskId}"]`); if (taskElement) { const isCompleted = taskElement.classList.toggle('completed'); // Update task in database (API call in real app) console.log(`Task ${taskId} ${isCompleted ? 'completed' : 'uncompleted'}`); // Update progress bars this.updateProjectProgress(taskElement.dataset.projectId); } } updateProjectProgress(projectId) { // Update progress for the specific project const progressElements = document.querySelectorAll(`[data-project-progress="${projectId}"]`); progressElements.forEach(el => { // Calculate new progress // This would be an API call in real app const newProgress = Math.min(100, parseInt(el.style.width) + 10); el.style.width = `${newProgress}%`; el.textContent = `${newProgress}%`; }); }
// Advanced task management methods addDependency(parentTaskId, childTaskId) { console.log(`Adding dependency: ${parentTaskId} -> ${childTaskId}`); return Promise.resolve({ success: true }); }
addCustomField(taskId, fieldName, value) { console.log(`Adding custom field ${fieldName} to task ${taskId}`); return Promise.resolve({ success: true }); }
createSubtask(parentTaskId, subtaskData) { console.log(`Creating subtask for ${parentTaskId}:`, subtaskData); return Promise.resolve({ id: Date.now(), ...subtaskData }); }
// Automation methods createAutomationRule(ruleData) { console.log('Creating automation rule:', ruleData); return Promise.resolve({ id: Date.now(), ...ruleData }); }
executeWorkflow(workflowId, inputData) { console.log(`Executing workflow ${workflowId}:`, inputData); return Promise.resolve({ success: true }); }
// Collaboration methods addComment(taskId, commentData) { console.log(`Adding comment to task ${taskId}:`, commentData); return Promise.resolve({ id: Date.now(), ...commentData }); }
sendStatusUpdate(updateData) { console.log('Sending status update:', updateData); return Promise.resolve({ success: true }); }
// Reporting methods generateReport(reportConfig) { console.log('Generating report:', reportConfig); return Promise.resolve({ id: Date.now(), data: {} }); }
createPortfolioView(portfolioData) { console.log('Creating portfolio view:', portfolioData); return Promise.resolve({ success: true }); }setupDragAndDrop() { // Setup drag and drop for board view const draggables = document.querySelectorAll('.draggable-task'); const columns = document.querySelectorAll('.board-column'); draggables.forEach(draggable => { draggable.addEventListener('dragstart', () => { draggable.classList.add('dragging'); }); draggable.addEventListener('dragend', () => { draggable.classList.remove('dragging'); }); }); columns.forEach(column => { column.addEventListener('dragover', e => { e.preventDefault(); const afterElement = this.getDragAfterElement(column, e.clientY); const draggable = document.querySelector('.dragging'); if (afterElement == null) { column.appendChild(draggable); } else { column.insertBefore(draggable, afterElement); } }); }); }
getDragAfterElement(container, y) { const draggableElements = [...container.querySelectorAll('.draggable-task:not(.dragging)')]; return draggableElements.reduce((closest, child) => { const box = child.getBoundingClientRect(); const offset = y - box.top - box.height / 2; if (offset < 0 && offset > closest.offset) { return { offset: offset, element: child }; } else { return closest; } }, { offset: Number.NEGATIVE_INFINITY }).element; }
openModal(modalId) { const modal = document.getElementById(modalId); if (modal) { modal.classList.remove('hidden'); document.body.style.overflow = 'hidden'; } }
closeModal() { document.querySelectorAll('.modal').forEach(modal => { modal.classList.add('hidden'); }); document.body.style.overflow = 'auto'; }
// Task management methods createTask(taskData) { // API call to create task console.log('Creating task:', taskData); return Promise.resolve({ id: Date.now(), ...taskData }); }
updateTask(taskId, updates) { // API call to update task console.log(`Updating task ${taskId}:`, updates); return Promise.resolve({ success: true }); }
deleteTask(taskId) { // API call to delete task console.log(`Deleting task ${taskId}`); return Promise.resolve({ success: true }); }
// Project management methods createProject(projectData) { // API call to create project console.log('Creating project:', projectData); return Promise.resolve({ id: Date.now(), ...projectData }); }
updateProject(projectId, updates) { // API call to update project console.log(`Updating project ${projectId}:`, updates); return Promise.resolve({ success: true }); }}
// Initialize app when DOM is loadeddocument.addEventListener('DOMContentLoaded', () => { window.taskTamer = new TaskTamerApp(); // Load preferred view const preferredView = localStorage.getItem('preferredView') || 'list'; window.taskTamer.switchView(preferredView); // Initialize tooltips const tooltipTriggers = document.querySelectorAll('[data-tooltip]'); tooltipTriggers.forEach(trigger => { trigger.addEventListener('mouseenter', (e) => { const tooltip = document.createElement('div'); tooltip.className = 'absolute z-50 px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm tooltip'; tooltip.textContent = e.target.dataset.tooltip; const rect = e.target.getBoundingClientRect(); tooltip.style.top = `${rect.top - 40}px`; tooltip.style.left = `${rect.left + rect.width / 2 - tooltip.offsetWidth / 2}px`; document.body.appendChild(tooltip); e.target._tooltip = tooltip; }); trigger.addEventListener('mouseleave', (e) => { if (e.target._tooltip) { e.target._tooltip.remove(); delete e.target._tooltip; } }); });});
// Utility functionsconst Utils = { formatDate(dateString) { const date = new Date(dateString); return date.toLocaleDateString('en-US', { weekday: 'short', month: 'short', day: 'numeric' }); },
formatRelativeDate(dateString) { const date = new Date(dateString); const now = new Date(); const diffTime = Math.abs(date - now); const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); if (diffDays === 0) return 'Today'; if (diffDays === 1) return 'Tomorrow'; if (diffDays < 7) return `In ${diffDays} days`; if (diffDays < 30) return `In ${Math.floor(diffDays / 7)} weeks`; return `In ${Math.floor(diffDays / 30)} months`; },
debounce(func, wait) { let timeout; return function executedFunction(...args) { const later = () => { clearTimeout(timeout); func(...args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); }; }};
// Make utilities globally availablewindow.Utils = Utils;12345678910111213141516171819202122232425262728body {padding: 2rem;font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;}h1 {font-size: 16px;margin-top: 0;}p {color: rgb(107, 114, 128);font-size: 15px;margin-bottom: 10px;margin-top: 5px;}.card {max-width: 620px;margin: 0 auto;padding: 16px;border: 1px solid lightgray;border-radius: 16px;}.card p:last-child {margin-bottom: 0;}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244/* Custom styles for TaskTamer Pro *//* Smooth transitions */* {transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;}/* Custom scrollbar */::-webkit-scrollbar {width: 8px;height: 8px;}::-webkit-scrollbar-track {background: #f1f1f1;border-radius: 4px;}::-webkit-scrollbar-thumb {background: #c1c1c1;border-radius: 4px;}::-webkit-scrollbar-thumb:hover {background: #a1a1a1;}/* Animations */@keyframes fadeIn {from {opacity: 0;transform: translateY(10px);}to {opacity: 1;transform: translateY(0);}}@keyframes slideIn {from {transform: translateX(-20px);opacity: 0;}to {transform: translateX(0);opacity: 1;}}.fade-in {animation: fadeIn 0.3s ease-out;}.slide-in {animation: slideIn 0.3s ease-out;}/* Progress bar animation */.progress-bar {transition: width 0.6s ease;}/* Task priority indicators */.priority-high::before {content: '';position: absolute;left: 0;top: 0;bottom: 0;width: 4px;background-color: #ef4444;border-radius: 2px 0 0 2px;}.priority-medium::before {content: '';position: absolute;left: 0;top: 0;bottom: 0;width: 4px;background-color: #f59e0b;border-radius: 2px 0 0 2px;}.priority-low::before {content: '';position: absolute;left: 0;top: 0;bottom: 0;width: 4px;background-color: #10b981;border-radius: 2px 0 0 2px;}/* Hover effects */.hover-lift:hover {transform: translateY(-2px);box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);}/* Loading skeleton */.skeleton {background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);background-size: 200% 100%;animation: loading 1.5s infinite;}@keyframes loading {0% {background-position: 200% 0;}100% {background-position: -200% 0;}}/* Board view columns */.board-column {min-height: 500px;background: #f8fafc;border: 1px dashed #cbd5e1;border-radius: 8px;}.board-column.active {background: white;border: 1px solid #e2e8f0;border-color: #fecaca;}/* Calendar day cells */.calendar-day {min-height: 120px;border: 1px solid #e5e7eb;}.calendar-day.today {border-color: #ef4444;background-color: #fef2f2;}/* Timeline view */.timeline-track {height: 2px;background: #e5e7eb;}.timeline-milestone {transform: translateX(-50%);}/* Automation rule styling */.automation-rule {border-left: 4px solid #10b981;}.automation-rule.draft {border-left-color: #f59e0b;}.automation-rule.paused {border-left-color: #6b7280;}.automation-rule.error {border-left-color: #ef4444;}/* Inbox item styling */.inbox-item.unread {border-left: 4px solid #3b82f6;}/* Custom fields */.custom-field {background: #f8fafc;border: 1px solid #e2e8f0;}/* Dependency visualization */.dependency-line {stroke: #6b7280;stroke-width: 2;stroke-dasharray: 5,5;}/* Reporting charts */.report-chart {position: relative;}.chart-tooltip {position: absolute;background: #1f2937;color: white;padding: 0.5rem;border-radius: 0.375rem;font-size: 0.875rem;z-index: 50;}/* Workflow states */.workflow-state {padding: 0.5rem 1rem;border-radius: 9999px;font-weight: 500;}.workflow-state.active {background: #10b981;color: white;}.workflow-state.pending {background: #f59e0b;color: white;}.workflow-state.completed {background: #6b7280;color: white;}/* Portfolio grid */.portfolio-grid {display: grid;gap: 1rem;grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));}/* Dashboard widgets */.dashboard-widget {background: white;border-radius: 0.75rem;border: 1px solid #e5e7eb;transition: all 0.2s ease;}.dashboard-widget:hover {transform: translateY(-2px);box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);}
README.md+8-5
automation.htmlAdded+182
components/automation-rule.jsAdded+252
components/inbox-item.jsAdded+194
components/navbar.jsAdded+261
components/project-card.jsAdded+267
components/report-card.jsAdded+168
components/sidebar.jsAdded+336
components/task-item.jsAdded+390
inbox.htmlAdded+109
index.html+196-19
reporting.htmlAdded+113
script.jsAdded+311
style.css+235-19