Spaces:
Running
Running
Download components/ticket-filter.js from Zeddfly/bugsquasher-pro: direct link, hf CLI and curl.
- Browser
- Download file 3.86 kB
-
https://huggingface.co/spaces/Zeddfly/bugsquasher-pro/resolve/main/components/ticket-filter.js
- Command line
-
hf download hf://spaces/Zeddfly/bugsquasher-pro/components/ticket-filter.js
-
curl -L -o ticket-filter.js https://huggingface.co/spaces/Zeddfly/bugsquasher-pro/resolve/main/components/ticket-filter.js
3.86 kB
| class TicketFilters extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| background: white; | |
| padding: 1rem; | |
| border-radius: 0.5rem; | |
| box-shadow: 0 1px 3px rgba(0,0,0,0.1); | |
| } | |
| .filter-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); | |
| gap: 1rem; | |
| } | |
| label { | |
| display: block; | |
| font-size: 0.875rem; | |
| font-weight: 500; | |
| color: #4b5563; | |
| margin-bottom: 0.25rem; | |
| } | |
| select, input { | |
| width: 100%; | |
| padding: 0.5rem; | |
| border: 1px solid #d1d5db; | |
| border-radius: 0.375rem; | |
| font-size: 0.875rem; | |
| } | |
| .filter-actions { | |
| display: flex; | |
| justify-content: flex-end; | |
| gap: 0.5rem; | |
| margin-top: 1rem; | |
| } | |
| button { | |
| padding: 0.5rem 1rem; | |
| border-radius: 0.375rem; | |
| font-size: 0.875rem; | |
| cursor: pointer; | |
| } | |
| .apply { | |
| background-color: #3b82f6; | |
| color: white; | |
| border: none; | |
| } | |
| .reset { | |
| background-color: white; | |
| border: 1px solid #d1d5db; | |
| } | |
| </style> | |
| <div class="filter-grid"> | |
| <div> | |
| <label for="status">Status</label> | |
| <select id="status"> | |
| <option value="">All Statuses</option> | |
| <option value="open">Open</option> | |
| <option value="in-progress">In Progress</option> | |
| <option value="resolved">Resolved</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="priority">Priority</label> | |
| <select id="priority"> | |
| <option value="">All Priorities</option> | |
| <option value="high">High</option> | |
| <option value="medium">Medium</option> | |
| <option value="low">Low</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="assigned">Assigned To</label> | |
| <select id="assigned"> | |
| <option value="">All Assignees</option> | |
| <option value="John D.">John D.</option> | |
| <option value="Sarah K.">Sarah K.</option> | |
| <option value="Mike T.">Mike T.</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="date">Date Range</label> | |
| <select id="date"> | |
| <option value="">All Time</option> | |
| <option value="today">Today</option> | |
| <option value="week">This Week</option> | |
| <option value="month">This Month</option> | |
| </select> | |
| </div> | |
| </div> | |
| <div class="filter-actions"> | |
| <button class="reset">Reset</button> | |
| <button class="apply">Apply Filters</button> | |
| </div> | |
| `; | |
| } | |
| } | |
| customElements.define('ticket-filters', TicketFilters); |